Browse Source

Only create inadyn config file if it doesn't exist

Bob Mottram 6 years ago
parent
commit
06b428e855
1 changed files with 5 additions and 3 deletions
  1. 5
    3
      src/freedombone-utils-web

+ 5
- 3
src/freedombone-utils-web View File

535
     fi
535
     fi
536
 
536
 
537
     # create a configuration file
537
     # create a configuration file
538
-    { echo 'period          = 300';
539
-      echo 'user-agent      = Mozilla/5.0';
540
-      echo ''; } > "${INADYN_CONFIG_FILE}"
538
+    if [ ! -f "${INADYN_CONFIG_FILE}" ]; then
539
+        { echo 'period          = 300';
540
+          echo 'user-agent      = Mozilla/5.0';
541
+          echo ''; } > "${INADYN_CONFIG_FILE}"
542
+    fi
541
     chmod 600 "${INADYN_CONFIG_FILE}"
543
     chmod 600 "${INADYN_CONFIG_FILE}"
542
 
544
 
543
     { echo '[Unit]';
545
     { echo '[Unit]';