|
@@ -8,6 +8,9 @@ STOP=01
|
|
|
CONFIGURATION=AdGuardHome
|
|
|
config_get configpath $CONFIGURATION configpath "/etc/AdGuardHome.yaml"
|
|
|
AdGuardHome_PORT=$(awk '/ port:/{printf($2)}' $configpath)
|
|
|
+config_get binpath $CONFIGURATION binpath "/usr/bin/AdGuardHome/AdGuardHome"
|
|
|
+mkdir -p ${binpath%/*}
|
|
|
+
|
|
|
if [ -z "$AdGuardHome_PORT" ]; then
|
|
|
AdGuardHome_PORT="0"
|
|
|
fi
|
|
@@ -244,7 +247,6 @@ start_service() {
|
|
|
local enabled
|
|
|
local ADDITIONAL_ARGS=""
|
|
|
|
|
|
- config_get configpath $CONFIGURATION configpath "/etc/AdGuardHome.yaml"
|
|
|
ADDITIONAL_ARGS="$ADDITIONAL_ARGS -c $configpath"
|
|
|
|
|
|
config_get hashpass $CONFIGURATION hashpass ""
|
|
@@ -267,8 +269,6 @@ start_service() {
|
|
|
ADDITIONAL_ARGS="$ADDITIONAL_ARGS -l $logfile"
|
|
|
fi
|
|
|
|
|
|
- config_get binpath $CONFIGURATION binpath "/usr/bin/AdGuardHome/AdGuardHome"
|
|
|
- mkdir -p ${binpath%/*}
|
|
|
if [ ! -f "$binpath" ]; then
|
|
|
do_redirect 0
|
|
|
touch /var/run/update_core
|
|
@@ -318,7 +318,7 @@ stop_service()
|
|
|
{
|
|
|
config_load "${CONFIGURATION}"
|
|
|
do_redirect 0
|
|
|
- killall -q AdGuardHome
|
|
|
+ killall -q $binpath
|
|
|
echo "AdGuardHome turn off"
|
|
|
echo "enabled="$enabled""
|
|
|
}
|