瀏覽代碼

Option for resetting tripwire

Bob Mottram 10 年之前
父節點
當前提交
6338256a27
共有 1 個檔案被更改,包括 15 行新增1 行删除
  1. 15
    1
      src/freedombone-sec

+ 15
- 1
src/freedombone-sec 查看文件

52
 
52
 
53
 REGENERATE_SSH_HOST_KEYS="no"
53
 REGENERATE_SSH_HOST_KEYS="no"
54
 REGENERATE_DH_KEYS="no"
54
 REGENERATE_DH_KEYS="no"
55
+RESET_TRIPWIRE="no"
55
 DH_KEYLENGTH=3072
56
 DH_KEYLENGTH=3072
56
 
57
 
57
 function get_protocols_from_website {
58
 function get_protocols_from_website {
373
   fi
374
   fi
374
 }
375
 }
375
 
376
 
377
+function reset_tripwire {
378
+  if [[ $RESET_TRIPWIRE == "yes" ]]; then
379
+      echo '
380
+
381
+' | reset-tripwire
382
+  fi
383
+}
384
+
376
 function housekeeping {
385
 function housekeeping {
377
   cmd=(dialog --separate-output \
386
   cmd=(dialog --separate-output \
378
               --backtitle "Freedombone Security Configuration" \
387
               --backtitle "Freedombone Security Configuration" \
379
               --title "Housekeeping options" \
388
               --title "Housekeeping options" \
380
               --checklist "If you don't need to do any of these things then just press Enter:" 10 76 16)
389
               --checklist "If you don't need to do any of these things then just press Enter:" 10 76 16)
381
   options=(1 "Regenerate ssh host keys" off
390
   options=(1 "Regenerate ssh host keys" off
382
-           2 "Regenerate Diffie-Hellman keys" off)
391
+           2 "Regenerate Diffie-Hellman keys" off
392
+           3 "Reset tripwire" off)
383
   choices=$("${cmd[@]}" "${options[@]}" 2>&1 >/dev/tty)
393
   choices=$("${cmd[@]}" "${options[@]}" 2>&1 >/dev/tty)
384
   clear
394
   clear
385
   for choice in $choices
395
   for choice in $choices
391
       2)
401
       2)
392
         REGENERATE_DH_KEYS="yes"
402
         REGENERATE_DH_KEYS="yes"
393
         ;;
403
         ;;
404
+      3)
405
+        RESET_TRIPWIRE="yes"
406
+        ;;
394
     esac
407
     esac
395
   done
408
   done
396
 }
409
 }
624
 change_xmpp_settings
637
 change_xmpp_settings
625
 regenerate_ssh_host_keys
638
 regenerate_ssh_host_keys
626
 regenerate_dh_keys
639
 regenerate_dh_keys
640
+reset_tripwire
627
 exit 0
641
 exit 0