Add an argument

This commit is contained in:
Bob Mottram 2016-05-02 10:04:03 +01:00
parent 87f76b3edd
commit 5d2a8c3206
1 changed files with 3 additions and 3 deletions

View File

@ -5314,12 +5314,12 @@ function configure_gpg {
} }
function refresh_gpg_keys { function refresh_gpg_keys {
if ! grep -q "${PROJECT_NAME}-sec --refresh" /etc/crontab; then if ! grep -q "${PROJECT_NAME}-sec --refresh yes" /etc/crontab; then
GPG_REFRESH_TIME=$(( RANDOM % 60 )) GPG_REFRESH_TIME=$(( RANDOM % 60 ))
if [ -f /usr/local/bin/freedombone-sec ]; then if [ -f /usr/local/bin/freedombone-sec ]; then
echo "$GPG_REFRESH_TIME */$REFRESH_GPG_KEYS_HOURS * * * root /usr/local/bin/${PROJECT_NAME}-sec --refresh > /dev/null" >> /etc/crontab echo "$GPG_REFRESH_TIME */$REFRESH_GPG_KEYS_HOURS * * * root /usr/local/bin/${PROJECT_NAME}-sec --refresh yes > /dev/null" >> /etc/crontab
else else
echo "$GPG_REFRESH_TIME */$REFRESH_GPG_KEYS_HOURS * * * root /usr/bin/${PROJECT_NAME}-sec --refresh > /dev/null" >> /etc/crontab echo "$GPG_REFRESH_TIME */$REFRESH_GPG_KEYS_HOURS * * * root /usr/bin/${PROJECT_NAME}-sec --refresh yes > /dev/null" >> /etc/crontab
fi fi
systemctl restart cron systemctl restart cron
fi fi