redirection not needed
This commit is contained in:
parent
78086e0e0b
commit
97fbdae1aa
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue