bugfixing

This commit is contained in:
leiweibau
2022-08-11 21:11:45 +02:00
committed by jokob-sk
parent 1ad41b1829
commit 5ffcd3db92

View File

@@ -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"
;; ;;