cronjob notification/sound fix

This commit is contained in:
Luke Smith 2018-06-08 11:50:08 -04:00
parent 2ee95907f1
commit 2063cda411

View File

@ -20,7 +20,7 @@ chooseSync() { (cat /var/run/crond.pid && testSync) || dialog --msgbox "No cron
testSync() { (crontab -l | grep .config/mutt/etc/mailsync && removeSync) || addSync ;} testSync() { (crontab -l | grep .config/mutt/etc/mailsync && removeSync) || addSync ;}
addSync() { min=$(dialog --inputbox "How many minutes should be between mail syncs?" 8 60 3>&1 1>&2 2>&3 3>&-) addSync() { min=$(dialog --inputbox "How many minutes should be between mail syncs?" 8 60 3>&1 1>&2 2>&3 3>&-)
(crontab -l; echo "*/$min * * * * $HOME/.config/mutt/etc/mailsync.sh") | crontab - && (crontab -l; echo "*/$min * * * * export DISPLAY=:0.0 && $HOME/.config/mutt/etc/mailsync.sh") | crontab - &&
dialog --msgbox "Cronjob successfully added. Remember you may need to restart or tell systemd/etc. to start your cron manager for this to take effect." 7 60 ;} dialog --msgbox "Cronjob successfully added. Remember you may need to restart or tell systemd/etc. to start your cron manager for this to take effect." 7 60 ;}
removeSync() { ((crontab -l | sed -e '/.config\/mutt\/etc\/mailsync/d') | crontab - >/dev/null) && dialog --msgbox "Cronjob successfully removed. To reactivate, select this option again." 6 60 ;} removeSync() { ((crontab -l | sed -e '/.config\/mutt\/etc\/mailsync/d') | crontab - >/dev/null) && dialog --msgbox "Cronjob successfully removed. To reactivate, select this option again." 6 60 ;}