redirection not needed

This commit is contained in:
Bob Mottram 2016-05-14 13:00:50 +01:00
parent 78086e0e0b
commit 97fbdae1aa
1 changed files with 2 additions and 2 deletions

View File

@ -5342,10 +5342,10 @@ function refresh_gpg_keys {
fi fi
if ! grep -q "$REFRESH_GPG_KEYS_SCRIPT" /etc/crontab; then if ! grep -q "$REFRESH_GPG_KEYS_SCRIPT" /etc/crontab; then
GPG_REFRESH_TIME=$(( RANDOM % 60 )) GPG_REFRESH_TIME=$(( RANDOM % 60 ))
echo "$GPG_REFRESH_TIME */$REFRESH_GPG_KEYS_HOURS * * * root cronic $REFRESH_GPG_KEYS_SCRIPT 2>&1 > /dev/null" >> /etc/crontab echo "$GPG_REFRESH_TIME */$REFRESH_GPG_KEYS_HOURS * * * root cronic $REFRESH_GPG_KEYS_SCRIPT" >> /etc/crontab
systemctl restart cron systemctl restart cron
else else
sed -i "s|root $REFRESH_GPG_KEYS_SCRIPT|root cronic $REFRESH_GPG_KEYS_SCRIPT|g" /etc/crontab sed -i "s|root $REFRESH_GPG_KEYS_SCRIPT.*|root cronic $REFRESH_GPG_KEYS_SCRIPT|g" /etc/crontab
fi fi
} }