Don't report every gpg key refresh
This commit is contained in:
parent
fdc426bbd8
commit
141aec2619
|
@ -5327,9 +5327,9 @@ function refresh_gpg_keys {
|
|||
REFRESH_GPG_KEYS_SCRIPT=/usr/bin/update-gpg-keys
|
||||
echo '#!/bin/bash' > $REFRESH_GPG_KEYS_SCRIPT
|
||||
echo "if [ -f /usr/local/bin/${PROJECT_NAME}-sec ]; then" >> $REFRESH_GPG_KEYS_SCRIPT
|
||||
echo " /usr/bin/timeout 600 /usr/local/bin/${PROJECT_NAME}-sec --refresh yes > /dev/null" >> $REFRESH_GPG_KEYS_SCRIPT
|
||||
echo " /usr/bin/timeout 600 /usr/local/bin/${PROJECT_NAME}-sec --refresh yes" >> $REFRESH_GPG_KEYS_SCRIPT
|
||||
echo 'else' >> $REFRESH_GPG_KEYS_SCRIPT
|
||||
echo " /usr/bin/timeout 600 /usr/bin/${PROJECT_NAME}-sec --refresh yes > /dev/null" >> $REFRESH_GPG_KEYS_SCRIPT
|
||||
echo " /usr/bin/timeout 600 /usr/bin/${PROJECT_NAME}-sec --refresh yes" >> $REFRESH_GPG_KEYS_SCRIPT
|
||||
echo 'fi' >> $REFRESH_GPG_KEYS_SCRIPT
|
||||
chmod +x $REFRESH_GPG_KEYS_SCRIPT
|
||||
|
||||
|
@ -5338,7 +5338,7 @@ function refresh_gpg_keys {
|
|||
fi
|
||||
if ! grep -q "$REFRESH_GPG_KEYS_SCRIPT" /etc/crontab; then
|
||||
GPG_REFRESH_TIME=$(( RANDOM % 60 ))
|
||||
echo "$GPG_REFRESH_TIME */$REFRESH_GPG_KEYS_HOURS * * * root $REFRESH_GPG_KEYS_SCRIPT" >> /etc/crontab
|
||||
echo "$GPG_REFRESH_TIME */$REFRESH_GPG_KEYS_HOURS * * * root $REFRESH_GPG_KEYS_SCRIPT 2>&1 > /dev/null" >> /etc/crontab
|
||||
systemctl restart cron
|
||||
fi
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue