Bob Mottram 7 anni fa
parent
commit
c9ee053494
1 ha cambiato i file con 4 aggiunte e 4 eliminazioni
  1. 4
    4
      src/freedombone-controlpanel

+ 4
- 4
src/freedombone-controlpanel Vedi File

154
                     dialog --title $"Check tripwire" \
154
                     dialog --title $"Check tripwire" \
155
                            --msgbox $"\nThe hash should not contain any spaces" 10 40
155
                            --msgbox $"\nThe hash should not contain any spaces" 10 40
156
                 else
156
                 else
157
-                    DBHASH=$(sha512sum  /var/lib/tripwire/${PROJECT_NAME}.twd | awk -F ' ' '{print $1}')
157
+                    DBHASH=$(sha512sum  /var/lib/tripwire/${HOSTNAME}.twd | awk -F ' ' '{print $1}')
158
                     if [[ "$DBHASH" == "$GIVEN_HASH" ]]; then
158
                     if [[ "$DBHASH" == "$GIVEN_HASH" ]]; then
159
                         dialog --title $"Check tripwire" \
159
                         dialog --title $"Check tripwire" \
160
                                --msgbox $"\nSuccess\n\nThe hash you gave matches the current tripwire database" 10 40
160
                                --msgbox $"\nSuccess\n\nThe hash you gave matches the current tripwire database" 10 40
1305
 }
1305
 }
1306
 
1306
 
1307
 function show_tripwire_verification_code {
1307
 function show_tripwire_verification_code {
1308
-    if [ ! -f /var/lib/tripwire/${PROJECT_NAME}.twd ]; then
1308
+    if [ ! -f /var/lib/tripwire/${HOSTNAME}.twd ]; then
1309
         return
1309
         return
1310
     fi
1310
     fi
1311
     clear
1311
     clear
1346
     echo $'Creating tripwire database'
1346
     echo $'Creating tripwire database'
1347
     echo '
1347
     echo '
1348
 
1348
 
1349
-' | tripwire --init --cfgfile /etc/tripwire/tw.cfg --polfile /etc/tripwire/tw.pol --dbfile /var/lib/tripwire/${PROJECT_NAME}.twd
1349
+' | tripwire --init --cfgfile /etc/tripwire/tw.cfg --polfile /etc/tripwire/tw.pol --dbfile /var/lib/tripwire/${HOSTNAME}.twd
1350
     echo $'Resetting the Tripwire...'
1350
     echo $'Resetting the Tripwire...'
1351
     echo ''
1351
     echo ''
1352
     echo '
1352
     echo '
1361
         systemctl restart nginx
1361
         systemctl restart nginx
1362
     fi
1362
     fi
1363
 
1363
 
1364
-    if [ -f /var/lib/tripwire/${PROJECT_NAME}.twd ]; then
1364
+    if [ -f /var/lib/tripwire/${HOSTNAME}.twd ]; then
1365
         show_tripwire_verification_code
1365
         show_tripwire_verification_code
1366
         echo $'Tripwire is now reset. Take a note of the above hash, or record'
1366
         echo $'Tripwire is now reset. Take a note of the above hash, or record'
1367
         echo $'the QR code using a mobile device. This will enable you to independently'
1367
         echo $'the QR code using a mobile device. This will enable you to independently'