Don't regenerate password if it already exists
This commit is contained in:
parent
8feec867bf
commit
93623fe0a6
10
deploy.sh
10
deploy.sh
|
@ -29,12 +29,16 @@ export lix_version="0.9.41"
|
||||||
|
|
||||||
export systemuser="onfoss"
|
export systemuser="onfoss"
|
||||||
export letsencryptemail="jarno@jarno.ca"
|
export letsencryptemail="jarno@jarno.ca"
|
||||||
export systempassword="$(< /dev/urandom tr -dc a-z | head -c${1:-8};echo;)"
|
|
||||||
|
|
||||||
# Store the randomly generated password. This is used for the web interface
|
# Store the randomly generated password. This is used for the web interface
|
||||||
# as well as for admin access for the game servers
|
# as well as for admin access for the game servers
|
||||||
echo "$systempassword" > /etc/gameserverpassword
|
if [ -f /etc/gameserverpassword ]; then
|
||||||
chmod go= /etc/gameserverpassword
|
export systempassword=$(cat /etc/gameserverpassword)
|
||||||
|
else
|
||||||
|
export systempassword="$(< /dev/urandom tr -dc a-z | head -c${1:-8};echo;)"
|
||||||
|
echo "$systempassword" > /etc/gameserverpassword
|
||||||
|
chmod go= /etc/gameserverpassword
|
||||||
|
fi
|
||||||
|
|
||||||
# Install what we need
|
# Install what we need
|
||||||
apt update -y && apt full-upgrade -y
|
apt update -y && apt full-upgrade -y
|
||||||
|
|
Reference in New Issue