Skip to content
Permalink
e1e4fd2c02
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
23 lines (17 sloc) 625 Bytes
#!/bin/bash
CRONFILE=/opt/tier/tier-cron
#set env vars for cron job
/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 "#* * * * * /usr/bin/sendtierbeacon.sh >> /var/log/cron.log 2>&1" >> ${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
#start crond
/usr/sbin/crond
#from intermediate container's CMD directive
/opt/bin/start.sh