Procházet zdrojové kódy

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>
tags/v3.1
Rob před 4 roky
committed by GitHub
rodič
revize
76417d7b07
V databázi nebyl nalezen žádný známý klíč pro tento podpis ID GPG klíče: 4AEE18F83AFDEB23
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. +1
    -1
      bin/mw

+ 1
- 1
bin/mw Zobrazit soubor

@@ -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 ;}



Načítá se…
Zrušit
Uložit