Set defaults for some environment variables
This commit is contained in:
parent
2836dfbeba
commit
aaa1092615
|
@ -4,16 +4,16 @@ config=( )
|
|||
playlist=( )
|
||||
|
||||
# Mandatory
|
||||
SERVER_SA_PASSWORD=${SERVER_SA_PASSWORD:?ERROR | SuperAdminPassword needs to be set. Generate with pwgen if needed.} && \
|
||||
config+=( "SERVER_SA_PASSWORD" )
|
||||
SERVER_ADM_PASSWORD=${SERVER_ADM_PASSWORD:?ERROR | AdminPassword needs to be set. Generate with pwgen if needed.} && \
|
||||
config+=( "SERVER_ADM_PASSWORD" )
|
||||
SERVER_LOGIN=${SERVER_LOGIN?:ERROR | ServerLogin is missing. Server cannot start.} && \
|
||||
config+=( "SERVER_LOGIN" )
|
||||
SERVER_LOGIN_PASSWORD=${SERVER_LOGIN_PASSWORD?:ERROR | ServerLoginPassword is missing. Server cannot start.} && \
|
||||
config+=( "SERVER_LOGIN_PASSWORD" )
|
||||
|
||||
# Optional
|
||||
SERVER_SA_PASSWORD=${SERVER_SA_PASSWORD:-$(pwgen -s 24 1)} && config+=( "SERVER_SA_PASSWORD" )
|
||||
echo "INFO | SERVER_SA_PASSWORD: ${SERVER_SA_PASSWORD}"
|
||||
SERVER_ADM_PASSWORD=${SERVER_ADM_PASSWORD:-$(pwgen -s 24 1)} && config+=( "SERVER_ADM_PASSWORD" )
|
||||
echo "INFO | SERVER_ADM_PASSWORD: ${SERVER_ADM_PASSWORD}"
|
||||
SERVER_PORT=${SERVER_PORT:-2350} && config+=( "SERVER_PORT" )
|
||||
echo "INFO | SERVER_PORT: ${SERVER_PORT}"
|
||||
SERVER_P2P_PORT=${SERVER_P2P_PORT:-3450} && config+=( "SERVER_P2P_PORT" )
|
||||
|
|
|
@ -21,7 +21,7 @@ echo "INFO | TMSERVER_PORT: ${TMSERVER_PORT}"
|
|||
MYSQL_HOST=${MYSQL_HOST:-db} && \
|
||||
database+=( "MYSQL_HOST" )
|
||||
echo "INFO | MYSQL_HOST: ${MYSQL_HOST}"
|
||||
MYSQL_LOGIN=${MYSQL_LOGIN:?ERROR | MySQL username was not given...} && \
|
||||
MYSQL_LOGIN=${MYSQL_LOGIN:?-trackmani} && \
|
||||
database+=( "MYSQL_LOGIN" )
|
||||
echo "INFO | MYSQL_LOGIN: ${MYSQL_LOGIN}"
|
||||
MYSQL_PASSWORD=${MYSQL_PASSWORD:?ERROR | MySQL password was not given...} && \
|
||||
|
|
Loading…
Reference in New Issue