Normalize startup script name
This commit is contained in:
20
root/etc/s6-overlay/scripts/initializer
Normal file
20
root/etc/s6-overlay/scripts/initializer
Normal file
@@ -0,0 +1,20 @@
|
||||
#!/command/with-contenv bash
|
||||
source ContainerTools
|
||||
SNAME=${BASH_SOURCE##*/}
|
||||
DATADIR=${DATADIR:=/var/lib/pterodactyl}
|
||||
|
||||
# Create specified data directory if it doesn't exist. Defaults to Wings default.
|
||||
log "Preparing workdir: ${DATADIR}"
|
||||
if [ ! -d $DATADIR ]; then
|
||||
mkdir -p $DATADIR
|
||||
fi
|
||||
|
||||
# Halt container boot unless the config file is present. Wings will not start without it.
|
||||
log "Checking for $DATADIR/config.yml before beginning execution"
|
||||
COUNT=1
|
||||
while [ ! -e $DATADIR/config.yml ]; do
|
||||
log "Attempt $COUNT, config file \"config.yml\" not present in \"$DATADIR\" - retrying in 15 seconds"
|
||||
((COUNT=COUNT+1))
|
||||
sleep 15
|
||||
done
|
||||
log "Config file found, starting Wings"
|
Reference in New Issue
Block a user