Skip to content

typo in startup.sh #31

Merged
merged 1 commit into from
Feb 15, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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