소스 검색

Remove legacy freedns updater from crontab if needed

Bob Mottram 9 년 전
부모
커밋
911f9d623b
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 3
    0
      src/freedombone-utils-dns

+ 3
- 0
src/freedombone-utils-dns 파일 보기

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