Don't use PID file but rather "pidof pihole-FTL" for detecting if another process is already running
This commit is contained in:
parent
3eacfa9831
commit
fcd92d27f7
|
@ -13,11 +13,11 @@ FTLUSER=pihole
|
|||
PIDFILE=/var/run/pihole-FTL.pid
|
||||
|
||||
get_pid() {
|
||||
cat "$PIDFILE"
|
||||
pidof "pihole-FTL"
|
||||
}
|
||||
|
||||
is_running() {
|
||||
[ -f "$PIDFILE" ] && ps "$(get_pid)" > /dev/null 2>&1
|
||||
ps "$(get_pid)" > /dev/null 2>&1
|
||||
}
|
||||
|
||||
# Start the service
|
||||
|
|
Loading…
Reference in New Issue