Rewrite to not need bash
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
#!/command/with-contenv bash
|
||||
#!/command/with-contenv sh
|
||||
|
||||
source ContainerTools
|
||||
SNAME=${BASH_SOURCE##*/}
|
||||
SNAME=${0##*/}
|
||||
WORKDIR="/var/www/pterodactyl"
|
||||
|
||||
#
|
||||
# If DBHOST value is present, pause boot until target container is up.
|
||||
if [ -n "$DBHOST" ]; then
|
||||
log "Waiting for SQL at $DBHOST:${DBPORT:=3306}"
|
||||
if wait-for-it $DBHOST:$DBPORT -q -t ${TESTTIME:=30}; then
|
||||
log "SQL found, continuing"
|
||||
if wait-for-it $DBHOST:$DBPORT -q -t ${TESTTIME:=30}; then
|
||||
log "SQL found, continuing"
|
||||
else
|
||||
log "SQL could not be reached! Exiting..."
|
||||
exit 1
|
||||
@@ -18,8 +18,8 @@ fi
|
||||
# If REDISHOST value is present, pause boot until target container is up.
|
||||
if [ -n "$REDISHOST" ]; then
|
||||
log "Waiting for Redis at $REDISHOST:${REDISPORT:=6379}"
|
||||
if wait-for-it $REDISHOST:$REDISPORT -q -t ${TESTTIME:=30}; then
|
||||
log "Redis found, continuing"
|
||||
if wait-for-it $REDISHOST:$REDISPORT -q -t ${TESTTIME:=30}; then
|
||||
log "Redis found, continuing"
|
||||
else
|
||||
log "Redis could not be reached! Exiting..."
|
||||
exit 1
|
||||
@@ -69,4 +69,4 @@ else
|
||||
ln -s /defaults/nginx/http.conf /etc/nginx/http.d/pterodactyl.conf
|
||||
fi
|
||||
fi
|
||||
log "Initialization complete"
|
||||
log "Initialization complete"
|
||||
|
Reference in New Issue
Block a user