forked from LiamAEdwards/SS14-Docker-Linux-Server
23 lines
564 B
Bash
23 lines
564 B
Bash
#!/bin/bash
|
|
|
|
# Check if directory is empty
|
|
if [ ! "$(ls -A /ss14)" ]; then
|
|
# Copy the default files
|
|
cp -R /ss14-default/* /ss14/
|
|
fi
|
|
|
|
# Start the watchdog
|
|
cd /ss14/publish/ || exit 1
|
|
|
|
if [ -x "./SS14.Watchdog" ]; then
|
|
exec ./SS14.Watchdog "$@"
|
|
elif [ -d "./SS14.Watchdog" ] && [ -x "./SS14.Watchdog/SS14.Watchdog" ]; then
|
|
cd ./SS14.Watchdog || exit 1
|
|
exec ./SS14.Watchdog "$@"
|
|
elif [ -x "./Robust.Server" ]; then
|
|
exec ./Robust.Server "$@"
|
|
else
|
|
echo "No SS14.Watchdog or Robust.Server executable found in /ss14/publish" >&2
|
|
exit 1
|
|
fi
|