Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
3 changed files
with
46 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/bin/bash | ||
CRONFILE=/opt/tier/tier-cron | ||
|
||
#set env vars for cron job | ||
# this script creates /opt/tier/env.bash which is sourced by the cron job's script, which was not seeing the environment set by the Dockerfile | ||
/opt/tier/setenv.sh | ||
|
||
#build crontab file with random start time between midnight and 3:59am | ||
echo "#send daily beacon to TIER Central" > ${CRONFILE} | ||
echo $(expr $RANDOM % 59) $(expr $RANDOM % 3) "* * * /usr/bin/sendtierbeacon.sh >> /var/log/cron.log 2>&1" >> ${CRONFILE} | ||
chmod 644 ${CRONFILE} | ||
|
||
#install crontab | ||
crontab ${CRONFILE} | ||
|
||
#create cron logfile | ||
touch /var/log/cron.log | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
[supervisord] | ||
nodaemon=true | ||
|
||
[program:cron] | ||
command=/usr/sbin/crond -n | ||
autostart=true | ||
autorestart=true | ||
redirect_stderr=true | ||
stdout_logfile=/dev/stdout | ||
stdout_logfile_maxbytes=0 | ||
stderr_logfile=/dev/stderr | ||
stderr_logfile_maxbytes=0 | ||
directory=/usr/bin | ||
|
||
[program:tomcat] | ||
command=/usr/local/tomcat/bin/catalina.sh run | ||
autostart=true | ||
autorestart=true | ||
redirect_stderr=true | ||
stdout_logfile=/dev/stdout | ||
stdout_logfile_maxbytes=0 | ||
stderr_logfile=/dev/stderr | ||
stderr_logfile_maxbytes=0 |