Browse Source

Remove legacy freedns update command

Bob Mottram 8 years ago
parent
commit
d242b21900
2 changed files with 8 additions and 4 deletions
  1. 2
    4
      src/freedombone-app-htmly
  2. 6
    0
      src/freedombone-utils-dns

+ 2
- 4
src/freedombone-app-htmly View File

@@ -325,10 +325,8 @@ function remove_htmly {
325 325
         rm -rf /var/www/$HTMLY_DOMAIN_NAME
326 326
     fi
327 327
     if [ $HTMLY_CODE ]; then
328
-        if [ -f /usr/bin/dynamicdns ]; then
329
-            sed -i "/$HTMLY_DOMAIN_NAME/d" /usr/bin/dynamicdns
330
-            sed -i "/$HTMLY_CODE/d" /usr/bin/dynamicdns
331
-        fi
328
+        sed -i '/HTMLY_DOMAIN_NAME.*/d' $CONFIGURATION_FILE
329
+        sed -i '/HTMLY_CODE.*/d' $CONFIGURATION_FILE
332 330
     fi
333 331
     function_check remove_onion_service
334 332
     remove_onion_service htmly ${HTMLY_ONION_PORT}

+ 6
- 0
src/freedombone-utils-dns View File

@@ -108,6 +108,12 @@ function create_freedns_updater {
108 108
         return
109 109
     fi
110 110
 
111
+    # remove any legacy command
112
+    if [ -f /usr/bin/dynamicdns ]; then
113
+        rm /usr/bin/dynamicdns
114
+    fi
115
+
116
+    # add the update command to cron
111 117
     if ! grep -q "/usr/local/bin/freedombone-freedns" /etc/crontab; then
112 118
         function_check cron_add_mins
113 119
         cron_add_mins 3 '/usr/local/bin/freedombone-freedns'