Add link to arkmanager in /usr/bin to allow crontab to call it directly
This commit is contained in:
parent
8b389d0bfb
commit
3629b0d1b9
2 changed files with 8 additions and 1 deletions
|
@ -57,6 +57,9 @@ WORKDIR /home/steam/ark-server-tools/tools
|
||||||
RUN chmod +x install.sh
|
RUN chmod +x install.sh
|
||||||
RUN ./install.sh steam
|
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
|
# Define default config file in /ark
|
||||||
COPY arkmanager-system.cfg /etc/arkmanager/arkmanager.cfg
|
COPY arkmanager-system.cfg /etc/arkmanager/arkmanager.cfg
|
||||||
|
|
||||||
|
|
6
run.sh
6
run.sh
|
@ -36,6 +36,8 @@ fi
|
||||||
# We load the crontab file if it exist.
|
# We load the crontab file if it exist.
|
||||||
if [ -f /ark/crontab ]; then
|
if [ -f /ark/crontab ]; then
|
||||||
crontab /ark/crontab
|
crontab /ark/crontab
|
||||||
|
# Cron is attached to this process
|
||||||
|
sudo cron -f &
|
||||||
else
|
else
|
||||||
cat <<EOT >> /ark/crontab
|
cat <<EOT >> /ark/crontab
|
||||||
# Example of job definition:
|
# Example of job definition:
|
||||||
|
@ -52,6 +54,8 @@ else
|
||||||
# */15 * * * * arkmanager backup
|
# */15 * * * * arkmanager backup
|
||||||
# Example : backup every day at midnight
|
# Example : backup every day at midnight
|
||||||
# 0 0 * * * arkmanager backup
|
# 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
|
EOT
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -61,7 +65,7 @@ arkmanager start
|
||||||
|
|
||||||
# Stop server in case of signal INT or TERM
|
# Stop server in case of signal INT or TERM
|
||||||
echo "Waiting..."
|
echo "Waiting..."
|
||||||
trap 'arkmanager stop' INT
|
trap 'arkmanager stop;' INT
|
||||||
trap 'arkmanager stop' TERM
|
trap 'arkmanager stop' TERM
|
||||||
|
|
||||||
read < /tmp/FIFO &
|
read < /tmp/FIFO &
|
||||||
|
|
Loading…
Reference in a new issue