Explorar el Código

Remove legacy freedns updater from crontab if needed

Bob Mottram hace 8 años
padre
commit
911f9d623b
Se han modificado 1 ficheros con 3 adiciones y 0 borrados
  1. 3
    0
      src/freedombone-utils-dns

+ 3
- 0
src/freedombone-utils-dns Ver fichero

@@ -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