[Pkg-voip-commits] r10157 - in /yate/trunk/debian: changelog yate.default yate.init yate.logrotate yate.postinst yate.postrm

dekkers-guest at alioth.debian.org dekkers-guest at alioth.debian.org
Tue May 7 22:45:56 UTC 2013


Author: dekkers-guest
Date: Tue May  7 22:45:55 2013
New Revision: 10157

URL: http://svn.debian.org/wsvn/pkg-voip/?sc=1&rev=10157
Log:
Put PID file in /var/run/yate instead of /var/run and put
log file in /var/log/yate instead of /var/log

Running as non-root means we can't write to /var/run and /var/log
anymore, so we need to put the logs and the PID file in a subdirectory
where the yate user has write access.

Modified:
    yate/trunk/debian/changelog
    yate/trunk/debian/yate.default
    yate/trunk/debian/yate.init
    yate/trunk/debian/yate.logrotate
    yate/trunk/debian/yate.postinst
    yate/trunk/debian/yate.postrm

Modified: yate/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-voip/yate/trunk/debian/changelog?rev=10157&op=diff
==============================================================================
--- yate/trunk/debian/changelog (original)
+++ yate/trunk/debian/changelog Tue May  7 22:45:55 2013
@@ -1,3 +1,11 @@
+yate (4.3.0-1~dfsg-2) UNRELEASED; urgency=low
+
+  * NOT RELEASED YET
+  * Put PID file in /var/run/yate instead of /var/run (Closes: #702812)
+  * Put log file in /var/log/yate instead of /var/log
+
+ -- Jeroen Dekkers <jeroen at dekkers.ch>  Mon, 06 May 2013 16:32:08 +0200
+
 yate (4.3.0-1~dfsg-1) experimental; urgency=low
 
   * New upstream release

Modified: yate/trunk/debian/yate.default
URL: http://svn.debian.org/wsvn/pkg-voip/yate/trunk/debian/yate.default?rev=10157&op=diff
==============================================================================
--- yate/trunk/debian/yate.default (original)
+++ yate/trunk/debian/yate.default Tue May  7 22:45:55 2013
@@ -5,7 +5,7 @@
 NO_START=1
 
 # Additional options that are passed to the Daemon.
-DAEMON_OPTS="-d -rs -l /var/log/yate.log -Dfu -vvvv"
+DAEMON_OPTS="-d -rs -l /var/log/yate/yate.log -Dfu -vvvv"
 YATE_USER="yate"
 YATE_GROUP="yate"
 # you might want to put less verbosity here..

Modified: yate/trunk/debian/yate.init
URL: http://svn.debian.org/wsvn/pkg-voip/yate/trunk/debian/yate.init?rev=10157&op=diff
==============================================================================
--- yate/trunk/debian/yate.init (original)
+++ yate/trunk/debian/yate.init Tue May  7 22:45:55 2013
@@ -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
 
@@ -33,6 +33,9 @@
 	exit 0
 fi
 set -e
+
+mkdir -p /var/run/yate
+chown $YATE_USER /var/run/yate
 
 case "$1" in
   start)

Modified: yate/trunk/debian/yate.logrotate
URL: http://svn.debian.org/wsvn/pkg-voip/yate/trunk/debian/yate.logrotate?rev=10157&op=diff
==============================================================================
--- yate/trunk/debian/yate.logrotate (original)
+++ yate/trunk/debian/yate.logrotate Tue May  7 22:45:55 2013
@@ -1,4 +1,4 @@
-/var/log/yate.log {
+/var/log/yate/*.log {
     daily
     rotate 7
     missingok
@@ -6,6 +6,6 @@
     compress
     create 640 yate yate
     postrotate
-	[ -f /var/run/yate.pid ] && kill -HUP `cat /var/run/yate.pid` || exit 0
+	[ -f /var/run/yate/yate.pid ] && kill -HUP `cat /var/run/yate/yate.pid` || exit 0
     endscript
 }

Modified: yate/trunk/debian/yate.postinst
URL: http://svn.debian.org/wsvn/pkg-voip/yate/trunk/debian/yate.postinst?rev=10157&op=diff
==============================================================================
--- yate/trunk/debian/yate.postinst (original)
+++ yate/trunk/debian/yate.postinst Tue May  7 22:45:55 2013
@@ -16,8 +16,8 @@
 	    adduser yate dialout
 	fi
 
-	mkdir -p /var/lib/yate
-	chown -R yate:yate /var/lib/yate
+	mkdir -p /var/lib/yate /var/log/yate
+	chown -R yate:yate /var/lib/yate /var/log/yate
 	setcap cap_sys_nice=eip /usr/bin/yate
 	;;
 

Modified: yate/trunk/debian/yate.postrm
URL: http://svn.debian.org/wsvn/pkg-voip/yate/trunk/debian/yate.postrm?rev=10157&op=diff
==============================================================================
--- yate/trunk/debian/yate.postrm (original)
+++ yate/trunk/debian/yate.postrm Tue May  7 22:45:55 2013
@@ -6,7 +6,7 @@
     purge)
 	deluser --quiet --system yate || true
 	delgroup --quiet --system yate || true
-	rm -rf /var/lib/yate
+	rm -rf /var/lib/yate /var/log/yate
 	;;
 
     remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)




More information about the Pkg-voip-commits mailing list