From 3629b0d1b923478abf67eb8ff808855890de2e40 Mon Sep 17 00:00:00 2001 From: TuRz4m Date: Tue, 27 Oct 2015 13:42:32 +0100 Subject: [PATCH] Add link to arkmanager in /usr/bin to allow crontab to call it directly --- Dockerfile | 3 +++ run.sh | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index e353ee2..2e5f8fc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 diff --git a/run.sh b/run.sh index 1004b80..c8f619b 100644 --- a/run.sh +++ b/run.sh @@ -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 <> /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 &