X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=charts%2Fresources%2Fscripts%2Finit%2Fo2_helmcli_start.sh;h=c0bd9de00d97fccaf32d9e9dd62f3aa9e3f72583;hb=29fa27bb53e2b4ff89f8ef61d0885df776bc14b1;hp=006b121eceb2b1e3f55d86cbcafdd4ee40103c48;hpb=ad15ec6b732868c3ecedb9cd84450462bafa3320;p=pti%2Fo2.git diff --git a/charts/resources/scripts/init/o2_helmcli_start.sh b/charts/resources/scripts/init/o2_helmcli_start.sh index 006b121..c0bd9de 100644 --- a/charts/resources/scripts/init/o2_helmcli_start.sh +++ b/charts/resources/scripts/init/o2_helmcli_start.sh @@ -1,15 +1,30 @@ -apt-get update && apt-get install ssh -y +# Copyright (C) 2022 Wind River Systems, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +#!/bin/bash + +apk add --no-cache openssh if [ -z "${HELM_USER_PASSWD}" ]; then HELM_USER_PASSWD=St8rlingX* fi -useradd helm -passwd helm << EOF + +adduser helm << EOF ${HELM_USER_PASSWD} ${HELM_USER_PASSWD} EOF -service ssh restart - -tail -f /dev/null \ No newline at end of file +ssh-keygen -A +exec /usr/sbin/sshd -D -e "$@" \ No newline at end of file