diff options
author | Rob <rjl6789@users.noreply.github.com> | 2020-06-09 13:41:38 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-09 08:41:38 -0400 |
commit | 76417d7b071b4a82338eb81ff835de2c070ea104 (patch) | |
tree | 7c244e26848a12c7c0d58352f3460ce2230be721 /bin | |
parent | 97708ce11eff2c145c551d391cbf4d5ee3f85c10 (diff) |
fix crontab set (#457)
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.
Co-authored-by: rjl6789 <rlives6789@gmail.com>
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/mw | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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 ;} |