start: do not print the root password when specified in `ROOT_PASSWORD` ENV variable
parent
67f3da6d53
commit
70bcf45aac
8
start
8
start
|
@ -34,10 +34,12 @@ rm -rf /etc/webmin
|
|||
ln -sf /data/webmin/etc /etc/webmin
|
||||
|
||||
if [ "${WEBMIN_ENABLED}" == "true" ]; then
|
||||
# set root password so that we can login via webmin
|
||||
ROOT_PASSWORD=${ROOT_PASSWORD:-$(pwgen -c -n -1 12)}
|
||||
if [ -z "${ROOT_PASSWORD}" ]; then
|
||||
# generate a random password for root
|
||||
ROOT_PASSWORD=$(pwgen -c -n -1 12)
|
||||
echo User: root Password: $ROOT_PASSWORD
|
||||
fi
|
||||
echo "root:$ROOT_PASSWORD" | chpasswd
|
||||
echo User: root Password: $ROOT_PASSWORD
|
||||
|
||||
echo "Starting webmin..."
|
||||
/etc/init.d/webmin start
|
||||
|
|
Loading…
Reference in New Issue