-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathschedule
26 lines (23 loc) · 918 Bytes
/
schedule
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/bash
#add movetopat & autopostreply to cron
#movetopat is on by default
#autopostreply is off by default
#20190325 km4ack
#make temp dir
mkdir -p $HOME/temp
#copy crontab to text file
crontab -l > $HOME/temp/crontemp.txt
#add new cron job and notes
echo "#-----Start EES Server Options------" >> $HOME/temp/crontemp.txt
echo "#Move EES email to Pat Winlink Outbox" >> $HOME/temp/crontemp.txt
echo "*/1 * * * * /var/www/html/movetopat" >> $HOME/temp/crontemp.txt
echo " " >> $HOME/temp/crontemp.txt
echo "#Auto post replies for EES server" >> $HOME/temp/crontemp.txt
echo "#Default is off. Activate by removing # on line below" >> $HOME/temp/crontemp.txt
echo "#*/1 * * * * /var/www/html/autopostreply" >> $HOME/temp/crontemp.txt
echo "#-----End EES Server Options------" >> $HOME/temp/crontemp.txt
#import cron with new job
crontab $HOME/temp/crontemp.txt
#remove temp file
rm $HOME/temp/crontemp.txt
exit 0