Bug#702812: init script stop fails because of missing pidfile

Holger Mauermann mauermann at gmail.com
Mon Mar 11 19:28:10 UTC 2013


Package: yate
Version: 4.3.0-1~dfsg-1
Severity: serious

yate's init script "stop" or "restart" doesn't work because the pidfile
can't be created if yate runs as unprivileged user. Default is to run as
user yate. A possible fix may be to create a subdirectory inside
/var/run that is owned by the yate user.

--- /etc/init.d/yate.orig	2013-03-11 19:49:08.204053159 +0100
+++ /etc/init.d/yate		2013-03-11 19:49:55.996052222 +0100
@@ -19,7 +19,7 @@
 DAEMON=/usr/bin/yate
 NAME=yate
 DESC=yate
-PIDFILE=/var/run/$NAME.pid
+PIDFILE=/var/run/yate/$NAME.pid

 test -x $DAEMON || exit 0

@@ -41,6 +41,8 @@
 	#so yate won't load the client modules
 	unset DISPLAY

+	[ -e /var/run/yate ] || \
+		install -d -o $YATE_USER -g $YATE_GROUP /var/run/yate	
 	start-stop-daemon --start --quiet --oknodo --pidfile $PIDFILE \
 		--chuid $YATE_USER --group $YATE_GROUP \
 		--exec $DAEMON -- -p $PIDFILE $DAEMON_OPTS



More information about the Pkg-voip-maintainers mailing list