Skip to content

Commit

Permalink
Merge pull request #31 from docker/3.3instrumenting
Browse files Browse the repository at this point in the history
typo in startup.sh
  • Loading branch information
pcaskey authored Feb 15, 2017
2 parents 97de1bd + c74e74d commit be41f14
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions files/bin/startup.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
#!/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" > /opt/tier/tier-cron
echo "* * * * * /usr/bin/sendtierbeacon.sh >> /var/log/cron.log 2>&1" >> /opt/tier/tier-cron
echo "#"$(expr $RANDOM % 59) $(expr $RANDOM % 3) "* * * /usr/bin/sendtierbeacon.sh >> /var/log/cron.log 2>&1" >> /opt/tier/tier-cron
chmod 644 /opt/tier/tier-cron
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 /opt/tier/tier-crontab
crontab ${CRONFILE}

#create cron logfile
touch /var/log/cron.log
Expand Down

0 comments on commit be41f14

Please sign in to comment.