浏览代码

Change ownership if file exists

Bob Mottram 7 年前
父节点
当前提交
d3057a6db3
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1
    1
      src/freedombone-client

+ 1
- 1
src/freedombone-client 查看文件

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