Browse Source

Remove legacy freedns updater from crontab if needed

Bob Mottram 8 years ago
parent
commit
911f9d623b
1 changed files with 3 additions and 0 deletions
  1. 3
    0
      src/freedombone-utils-dns

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

@@ -112,6 +112,9 @@ function create_freedns_updater {
112 112
     if [ -f /usr/bin/dynamicdns ]; then
113 113
         rm /usr/bin/dynamicdns
114 114
     fi
115
+    if grep -q "dynamicdns" /etc/crontab; then
116
+        sed -i '/dynamicdns/d' /etc/crontab
117
+    fi
115 118
 
116 119
     # add the update command to cron
117 120
     if ! grep -q "/usr/local/bin/freedombone-freedns" /etc/crontab; then