Turned out that the pidfile was never written by ZNC. Tried to generate it with the --make-pidfile option of the start-stop-daemon, but the written pid was not the correct one.
For now this is my fix in the init.d script, maybe it helps someone.
Just installed ZNC on Raspbian/Debian and followed the instructions to set up ZNC as system daemon on:
http://wiki.znc.in/Running_ZNC_as_a_system_daemon#Debian-based_machines
And set up the file in /etc.initrd.
But asking for the status of the service always failed.
Turned out that the pidfile was never written by ZNC. Tried to generate it with the --make-pidfile option of the start-stop-daemon, but the written pid was not the correct one.
For now this is my fix in the init.d script, maybe it helps someone.
```
--- znc.orig 2014-10-03 23:55:29.605214182 +0200
+++ znc 2014-10-03 23:56:50.242064196 +0200
@@ -12,7 +12,7 @@
PATH=/sbin:/usr/sbin:/bin:/usr/bin
DESC="ZNC daemon"
NAME=znc
-DAEMON=/usr/bin/$NAME
+DAEMON=/usr/local/bin/$NAME
DATADIR=/var/lib/znc
DAEMON_ARGS="--datadir=$DATADIR"
PIDDIR=/var/run/znc
@@ -51,6 +51,9 @@
chown $USER:$GROUP $PIDDIR
start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test --chuid $USER > /dev/null || return 1
start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --chuid $USER -- $DAEMON_ARGS > /dev/null || return 2
+ # pidfile is not generated and --make-pidfile writes the wrong pid (-1)
+ # create correct pidfile with `pidof`
+ pidof "${NAME}" > ${PIDFILE} || return 3
}
#
```
<!-- github-sync-id:44853912 -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Just installed ZNC on Raspbian/Debian and followed the instructions to set up ZNC as system daemon on:
http://wiki.znc.in/Running_ZNC_as_a_system_daemon#Debian-based_machines
And set up the file in /etc.initrd.
But asking for the status of the service always failed.
Turned out that the pidfile was never written by ZNC. Tried to generate it with the --make-pidfile option of the start-stop-daemon, but the written pid was not the correct one.
For now this is my fix in the init.d script, maybe it helps someone.
Adding
PidFile = /var/run/znc/znc.pidto your znc.conf will fix this.Thanks, this works.
Where is the option to enable pidfile in webadmin and controlpanel?