mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2025-12-07 09:36:05 -08:00
bugfixing
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
PIA_CONF_FILE='../config/pialert.conf'
|
SCRIPT=$(readlink -f $0)
|
||||||
PIA_PASS=$2
|
SCRIPTPATH=`dirname $SCRIPT`
|
||||||
|
PIA_CONF_FILE=${SCRIPTPATH}'/../config/pialert.conf'
|
||||||
|
|
||||||
case $1 in
|
case $1 in
|
||||||
|
|
||||||
@@ -67,6 +68,7 @@ case $1 in
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
set_password)
|
set_password)
|
||||||
|
PIA_PASS=$2
|
||||||
## Check if PIALERT_WEB_PROTECTION exists
|
## Check if PIALERT_WEB_PROTECTION exists
|
||||||
CHECK_PROT=$(grep "PIALERT_WEB_PROTECTION" $PIA_CONF_FILE | wc -l)
|
CHECK_PROT=$(grep "PIALERT_WEB_PROTECTION" $PIA_CONF_FILE | wc -l)
|
||||||
if [ $CHECK_PROT -eq 0 ]
|
if [ $CHECK_PROT -eq 0 ]
|
||||||
@@ -122,13 +124,13 @@ case $1 in
|
|||||||
disable_scan)
|
disable_scan)
|
||||||
## stop active scans
|
## stop active scans
|
||||||
sudo killall arp-scan
|
sudo killall arp-scan
|
||||||
touch ../db/setting_stoparpscan
|
touch ${SCRIPTPATH}/../db/setting_stoparpscan
|
||||||
echo "The arp-scan is disabled"
|
echo "The arp-scan is disabled"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
enable_scan)
|
enable_scan)
|
||||||
## stop active scans
|
## stop active scans
|
||||||
rm ../db/setting_stoparpscan
|
rm ${SCRIPTPATH}/../db/setting_stoparpscan
|
||||||
echo "The arp-scan is enabled"
|
echo "The arp-scan is enabled"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user