Change ownership if file exists
This commit is contained in:
parent
d1535c71ea
commit
d3057a6db3
|
@ -94,8 +94,8 @@ function refresh_gpg_keys {
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
sudo cp /etc/crontab ~/temp_crontab
|
sudo cp /etc/crontab ~/temp_crontab
|
||||||
sudo chown "$CURR_USER":"$CURR_GROUP" ~/temp_crontab
|
|
||||||
if [ -f ~/temp_crontab ]; then
|
if [ -f ~/temp_crontab ]; then
|
||||||
|
sudo chown "$CURR_USER":"$CURR_GROUP" ~/temp_crontab
|
||||||
if grep -q 'test' ~/temp_crontab; then
|
if grep -q 'test' ~/temp_crontab; then
|
||||||
if ! grep -q 'gpg --refresh-keys' ~/temp_crontab; then
|
if ! grep -q 'gpg --refresh-keys' ~/temp_crontab; then
|
||||||
echo "0 */$REFRESH_GPG_KEYS_HOURS * * * $CURR_USER /usr/bin/gpg --refresh-keys > /dev/null" >> ~/temp_crontab
|
echo "0 */$REFRESH_GPG_KEYS_HOURS * * * $CURR_USER /usr/bin/gpg --refresh-keys > /dev/null" >> ~/temp_crontab
|
||||||
|
|
Loading…
Reference in New Issue