|
@@ -1325,10 +1325,15 @@ function reset_tripwire {
|
1325
|
1325
|
any_key
|
1326
|
1326
|
return
|
1327
|
1327
|
fi
|
1328
|
|
- if [ ! -f /etc/tripwire/${PROJECT_NAME}-local.key ]; then
|
1329
|
|
- echo $'Error: missing local key'
|
1330
|
|
- any_key
|
1331
|
|
- return
|
|
1328
|
+ if [ ! -f /etc/tripwire/${HOSTNAME}-local.key ]; then
|
|
1329
|
+ if [ -f /etc/tripwire/${PROJECT_NAME}-local.key ]; then
|
|
1330
|
+ mv /etc/tripwire/${PROJECT_NAME}-local.key /etc/tripwire/${HOSTNAME}-local.key
|
|
1331
|
+ mv /etc/tripwire/${PROJECT_NAME}-site.key /etc/tripwire/${HOSTNAME}-site.key
|
|
1332
|
+ else
|
|
1333
|
+ echo $'Error: missing local key'
|
|
1334
|
+ any_key
|
|
1335
|
+ return
|
|
1336
|
+ fi
|
1332
|
1337
|
fi
|
1333
|
1338
|
clear
|
1334
|
1339
|
echo $'Turing off logging...'
|
|
@@ -1338,11 +1343,11 @@ function reset_tripwire {
|
1338
|
1343
|
echo $'Creating configuration...'
|
1339
|
1344
|
echo '
|
1340
|
1345
|
|
1341
|
|
- ' | twadmin --create-cfgfile -S /etc/tripwire/${PROJECT_NAME}-site.key /etc/tripwire/twcfg.txt
|
|
1346
|
+ ' | twadmin --create-cfgfile -S /etc/tripwire/${HOSTNAME}-site.key /etc/tripwire/twcfg.txt
|
1342
|
1347
|
echo $'Resetting policy...'
|
1343
|
1348
|
echo '
|
1344
|
1349
|
|
1345
|
|
- ' | twadmin --create-polfile -S /etc/tripwire/${PROJECT_NAME}-site.key /etc/tripwire/twpol.txt
|
|
1350
|
+ ' | twadmin --create-polfile -S /etc/tripwire/${HOSTNAME}-site.key /etc/tripwire/twpol.txt
|
1346
|
1351
|
echo $'Creating tripwire database'
|
1347
|
1352
|
echo '
|
1348
|
1353
|
|