[DRE-commits] [SCM] syncache.git branch, master, updated. upstream/1.0-6-gf310a47

Dmitry Borodaenko angdraug at debian.org
Sun Sep 25 15:22:08 UTC 2011


The following commit has been merged in the master branch:
commit f310a4767f4bf96d5682686271aa8e01487a58a6
Author: Dmitry Borodaenko <angdraug at debian.org>
Date:   Sun Sep 25 18:14:08 2011 +0300

    move piddir creation from postinst to init script

diff --git a/debian/postinst b/debian/postinst
index a861192..ab2db90 100644
--- a/debian/postinst
+++ b/debian/postinst
@@ -12,9 +12,6 @@ case "$1" in
 		adduser --quiet --system --home "$PIDDIR" --no-create-home \
 		--gecos 'SynCache DRb Server' --group syncache
 
-	# Create pidfile directory
-	[ -d "$PIDDIR" ] || install -o syncache -g syncache -d "$PIDDIR"
-
 	;;
 
 	failed-upgrade|abort-upgrade|abort-remove|abort-deconfigure|in-favour|removing)
diff --git a/debian/syncache.init b/debian/syncache.init
index f785d33..7cc035b 100755
--- a/debian/syncache.init
+++ b/debian/syncache.init
@@ -69,6 +69,12 @@ test -f $DAEMON || exit 0
 set -e
 
 syncache_start () {
+	PIDDIR=`dirname "$PIDFILE"`
+	if [ -d "$PIDDIR" ]; then
+		chmod 755 "$PIDDIR"
+	else
+		install -o syncache -g syncache -m 755 -d "$PIDDIR"
+	fi
 	start-stop-daemon --start --pidfile $PIDFILE --name $PNAME \
 	    $NICE --oknodo --startas $DAEMON -- $OPTIONS
 }

-- 
syncache.git



More information about the Pkg-ruby-extras-commits mailing list