瀏覽代碼

Tripwire installation

Bob Mottram 10 年之前
父節點
當前提交
231a56803e
共有 1 個文件被更改,包括 13 次插入6 次删除
  1. 13
    6
      install-freedombone.sh

+ 13
- 6
install-freedombone.sh 查看文件

2814
           create_backup_script
2814
           create_backup_script
2815
           create_restore_script
2815
           create_restore_script
2816
           backup_to_friends_servers
2816
           backup_to_friends_servers
2817
+          intrusion_detection
2817
           echo ''
2818
           echo ''
2818
           echo "$EMAIL_COMPLETE_MSG"
2819
           echo "$EMAIL_COMPLETE_MSG"
2819
           if [ -d $USB_MOUNT ]; then
2820
           if [ -d $USB_MOUNT ]; then
2840
       create_backup_script
2841
       create_backup_script
2841
       create_restore_script
2842
       create_restore_script
2842
       backup_to_friends_servers
2843
       backup_to_friends_servers
2843
-      apt-get -y --force-yes autoremove
2844
+      intrusion_detection
2844
       # unmount any attached usb drive
2845
       # unmount any attached usb drive
2845
       echo ''
2846
       echo ''
2846
       echo "$EMAIL_COMPLETE_MSG"
2847
       echo "$EMAIL_COMPLETE_MSG"
2905
           create_backup_script
2906
           create_backup_script
2906
           create_restore_script
2907
           create_restore_script
2907
           backup_to_friends_servers
2908
           backup_to_friends_servers
2908
-          apt-get -y --force-yes autoremove
2909
+          intrusion_detection
2909
           # unmount any attached usb drive
2910
           # unmount any attached usb drive
2910
           if [ -d $USB_MOUNT ]; then
2911
           if [ -d $USB_MOUNT ]; then
2911
               umount $USB_MOUNT
2912
               umount $USB_MOUNT
3067
       create_backup_script
3068
       create_backup_script
3068
       create_restore_script
3069
       create_restore_script
3069
       backup_to_friends_servers
3070
       backup_to_friends_servers
3070
-      apt-get -y --force-yes autoremove
3071
+      intrusion_detection
3071
       # unmount any attached usb drive
3072
       # unmount any attached usb drive
3072
       if [ -d $USB_MOUNT ]; then
3073
       if [ -d $USB_MOUNT ]; then
3073
           umount $USB_MOUNT
3074
           umount $USB_MOUNT
3459
       return
3460
       return
3460
   fi
3461
   fi
3461
   if [ ! $BLOG_DOMAIN_NAME ]; then
3462
   if [ ! $BLOG_DOMAIN_NAME ]; then
3462
-	  return
3463
+      return
3463
   fi
3464
   fi
3464
 
3465
 
3465
   if [ ! -d /var/www/$BLOG_DOMAIN_NAME ]; then
3466
   if [ ! -d /var/www/$BLOG_DOMAIN_NAME ]; then
3466
-	  mkdir /var/www/$BLOG_DOMAIN_NAME
3467
+      mkdir /var/www/$BLOG_DOMAIN_NAME
3467
   fi
3468
   fi
3468
 
3469
 
3469
   cd /var/www/$BLOG_DOMAIN_NAME
3470
   cd /var/www/$BLOG_DOMAIN_NAME
4549
   echo ''
4550
   echo ''
4550
   echo ''
4551
   echo ''
4551
   tripwire --init
4552
   tripwire --init
4553
+  sed -i 's/SYSLOGREPORTING =true/#SYSLOGREPORTING =false/g' /etc/tripwire/twcfg.txt
4554
+  sed -i '/# These files change the behavior of the root account/,/}/ s/# *//' /etc/tripwire/twpol.txt
4552
   tripwire --update-policy --secure-mode low /etc/tripwire/twpol.txt
4555
   tripwire --update-policy --secure-mode low /etc/tripwire/twpol.txt
4553
-  tripwire --check
4556
+
4557
+  # make a script for easy resetting of the tripwire
4558
+  echo '#!/bin/sh' > /usr/bin/reset-tripwire
4559
+  echo 'tripwire --update-policy --secure-mode low /etc/tripwire/twpol.txt' >> /usr/bin/reset-tripwire
4560
+  chmod +x /usr/bin/reset-tripwire
4554
 
4561
 
4555
   echo 'intrusion_detection' >> $COMPLETION_FILE
4562
   echo 'intrusion_detection' >> $COMPLETION_FILE
4556
 }
4563
 }