Ver código fonte

Option for resetting tripwire

Bob Mottram 9 anos atrás
pai
commit
6338256a27
1 arquivos alterados com 15 adições e 1 exclusões
  1. 15
    1
      src/freedombone-sec

+ 15
- 1
src/freedombone-sec Ver arquivo

@@ -52,6 +52,7 @@ CURRENT_DIR=$(pwd)
52 52
 
53 53
 REGENERATE_SSH_HOST_KEYS="no"
54 54
 REGENERATE_DH_KEYS="no"
55
+RESET_TRIPWIRE="no"
55 56
 DH_KEYLENGTH=3072
56 57
 
57 58
 function get_protocols_from_website {
@@ -373,13 +374,22 @@ function regenerate_dh_keys {
373 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 385
 function housekeeping {
377 386
   cmd=(dialog --separate-output \
378 387
               --backtitle "Freedombone Security Configuration" \
379 388
               --title "Housekeeping options" \
380 389
               --checklist "If you don't need to do any of these things then just press Enter:" 10 76 16)
381 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 393
   choices=$("${cmd[@]}" "${options[@]}" 2>&1 >/dev/tty)
384 394
   clear
385 395
   for choice in $choices
@@ -391,6 +401,9 @@ function housekeeping {
391 401
       2)
392 402
         REGENERATE_DH_KEYS="yes"
393 403
         ;;
404
+      3)
405
+        RESET_TRIPWIRE="yes"
406
+        ;;
394 407
     esac
395 408
   done
396 409
 }
@@ -624,4 +637,5 @@ change_ssh_settings
624 637
 change_xmpp_settings
625 638
 regenerate_ssh_host_keys
626 639
 regenerate_dh_keys
640
+reset_tripwire
627 641
 exit 0