Add link to arkmanager in /usr/bin to allow crontab to call it directly

This commit is contained in:
TuRz4m 2015-10-27 13:42:32 +01:00
parent 8b389d0bfb
commit 3629b0d1b9
2 changed files with 8 additions and 1 deletions

View file

@ -57,6 +57,9 @@ WORKDIR /home/steam/ark-server-tools/tools
RUN chmod +x install.sh
RUN ./install.sh steam
# Allow crontab to call arkmanager
RUN ln -s /usr/local/bin/arkmanager /usr/bin/arkmanager
# Define default config file in /ark
COPY arkmanager-system.cfg /etc/arkmanager/arkmanager.cfg

6
run.sh
View file

@ -36,6 +36,8 @@ fi
# We load the crontab file if it exist.
if [ -f /ark/crontab ]; then
crontab /ark/crontab
# Cron is attached to this process
sudo cron -f &
else
cat <<EOT >> /ark/crontab
# Example of job definition:
@ -52,6 +54,8 @@ else
# */15 * * * * arkmanager backup
# Example : backup every day at midnight
# 0 0 * * * arkmanager backup
# WARNING : the container timezone is maybe not your current timezone
# You can sync them with option -v /etc/localtime:/etc/localtime:ro or -e "TZ=UTC"
EOT
fi
@ -61,7 +65,7 @@ arkmanager start
# Stop server in case of signal INT or TERM
echo "Waiting..."
trap 'arkmanager stop' INT
trap 'arkmanager stop;' INT
trap 'arkmanager stop' TERM
read < /tmp/FIFO &