Quellcode durchsuchen

Change ownership if file exists

Bob Mottram vor 7 Jahren
Ursprung
Commit
d3057a6db3
1 geänderte Dateien mit 1 neuen und 1 gelöschten Zeilen
  1. 1
    1
      src/freedombone-client

+ 1
- 1
src/freedombone-client Datei anzeigen

@@ -94,8 +94,8 @@ function refresh_gpg_keys {
94 94
         fi
95 95
     fi
96 96
     sudo cp /etc/crontab ~/temp_crontab
97
-    sudo chown "$CURR_USER":"$CURR_GROUP" ~/temp_crontab
98 97
     if [ -f ~/temp_crontab ]; then
98
+        sudo chown "$CURR_USER":"$CURR_GROUP" ~/temp_crontab
99 99
         if grep -q 'test' ~/temp_crontab; then
100 100
             if ! grep -q 'gpg --refresh-keys' ~/temp_crontab; then
101 101
                 echo "0            */$REFRESH_GPG_KEYS_HOURS *   *   *   $CURR_USER /usr/bin/gpg --refresh-keys > /dev/null" >> ~/temp_crontab