From 1930b60930041c2e2a9253d08bad6d2858dda0ad Mon Sep 17 00:00:00 2001 From: rjl6789 Date: Tue, 9 Jun 2020 09:19:01 +0100 Subject: [PATCH] fix crontab set I think a recent change tried to send output from crontab to dev/null to avoid messages appearing a) when setting the crontab, b) whenever mailsync is run. However the redirection was for the string concatenation meaning a null string was piped to cron obliterating the crontab (thank goodness for backups). I have put the redirection in the correct location (similar to a few lines above when removing the mailsync line). I have also redirected all output of the mailsync (both errors and normal messages) to dev null. --- bin/mw | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/mw b/bin/mw index 5293c5d..1d986d1 100755 --- a/bin/mw +++ b/bin/mw @@ -303,7 +303,7 @@ choosecron() { ! pgrep cron >/dev/null && echo "No cron manager running. Install read -r minnum printf "\033[0m" done - (crontab -l; echo "*/$minnum * * * * $(type mailsync | cut -d' ' -f3)") >/dev/null | crontab - && + (crontab -l; echo "*/$minnum * * * * $(type mailsync | cut -d' ' -f3) >/dev/null 2>&1") | crontab - >/dev/null && echo "Cronjob added. Mail will sync every $minnum minutes. Be sure you have your cron manager running." fi ;}