Run gpg key refresh as root

This commit is contained in:
Bob Mottram 2016-05-02 09:58:54 +01:00
parent a4415c5de4
commit f87db99db6
1 changed files with 2 additions and 2 deletions

View File

@ -5316,9 +5316,9 @@ function configure_gpg {
function refresh_gpg_keys {
if ! grep -q "${PROJECT_NAME}-sec --refresh" /etc/crontab; then
if [ -f /usr/local/bin/freedombone-sec ]; then
echo "0 */$REFRESH_GPG_KEYS_HOURS * * * $MY_USERNAME /usr/local/bin/${PROJECT_NAME}-sec --refresh > /dev/null" >> /etc/crontab
echo "0 */$REFRESH_GPG_KEYS_HOURS * * * root /usr/local/bin/${PROJECT_NAME}-sec --refresh > /dev/null" >> /etc/crontab
else
echo "0 */$REFRESH_GPG_KEYS_HOURS * * * $MY_USERNAME /usr/bin/${PROJECT_NAME}-sec --refresh > /dev/null" >> /etc/crontab
echo "0 */$REFRESH_GPG_KEYS_HOURS * * * root /usr/bin/${PROJECT_NAME}-sec --refresh > /dev/null" >> /etc/crontab
fi
systemctl restart cron
fi