Normalize startup script name

This commit is contained in:
2024-01-22 21:13:39 -06:00
parent 3364d32e23
commit bd7a4dd15a
3 changed files with 2 additions and 2 deletions

View 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"