newline
This commit is contained in:
parent
c49c16d040
commit
27d29025fe
|
@ -22,8 +22,7 @@ crontab -l > /tmp/mycron
|
|||
awk -i inplace -v rmv="cron_MINUTE" '!index($0,rmv)' /tmp/mycron && echo "Astroport cron was there"
|
||||
crontest=$(cat /tmp/mycron | grep -F 'cron_MINUTE')
|
||||
# Create cron_MINUTE.sh cron
|
||||
[[ ! $crontest ]] && echo "* * * * * $MY_PATH/../cron_MINUTE.sh >> /tmp/astroport.log 2>&1" >> /tmp/mycron \
|
||||
&& crontab /tmp/mycron # Write crontab
|
||||
[[ ! $crontest ]] && echo "* * * * * $MY_PATH/../cron_MINUTE.sh >> /tmp/astroport.log 2>&1" >> /tmp/mycron && crontab /tmp/mycron \
|
||||
|| echo "Cannot operate, please check crontab -l" && exit 1
|
||||
# Clean
|
||||
rm /tmp/mycron
|
||||
|
|
Loading…
Reference in New Issue