[Python-apps-commits] r6729 - in packages/sabnzbdplus/trunk/debian (3 files)
jcfp-guest at users.alioth.debian.org
jcfp-guest at users.alioth.debian.org
Fri Mar 4 21:35:27 UTC 2011
Date: Friday, March 4, 2011 @ 21:35:24
Author: jcfp-guest
Revision: 6729
Permit USER=u:g for init script
Modified:
packages/sabnzbdplus/trunk/debian/changelog
packages/sabnzbdplus/trunk/debian/copyright
packages/sabnzbdplus/trunk/debian/sabnzbdplus.init
Modified: packages/sabnzbdplus/trunk/debian/changelog
===================================================================
--- packages/sabnzbdplus/trunk/debian/changelog 2011-03-04 20:57:37 UTC (rev 6728)
+++ packages/sabnzbdplus/trunk/debian/changelog 2011-03-04 21:35:24 UTC (rev 6729)
@@ -1,8 +1,11 @@
sabnzbdplus (0.5.6-2) UNRELEASED; urgency=low
- * Init script: properly read exit status of mktemp.
+ * Init script:
+ + Properly read the exit status of mktemp.
+ + Permit setting a group too (chown syntax, USER=u:g).
+ * debian/pyversions: allow 2.7.
- -- JCF Ploemen (jcfp) <linux at jp.pp.ru> Wed, 08 Dec 2010 18:57:23 +0100
+ -- JCF Ploemen (jcfp) <linux at jp.pp.ru> Fri, 04 Mar 2011 22:21:04 +0100
sabnzbdplus (0.5.6-1) unstable; urgency=low
Modified: packages/sabnzbdplus/trunk/debian/copyright
===================================================================
--- packages/sabnzbdplus/trunk/debian/copyright 2011-03-04 20:57:37 UTC (rev 6728)
+++ packages/sabnzbdplus/trunk/debian/copyright 2011-03-04 21:35:24 UTC (rev 6729)
@@ -431,7 +431,7 @@
* debian/*
- Copyright (C) 2007-2010 by JCF Ploemen <linux at jp.pp.ru>
+ Copyright (C) 2007-2011 by JCF Ploemen <linux at jp.pp.ru>
License: GPL-2+
Modified: packages/sabnzbdplus/trunk/debian/sabnzbdplus.init
===================================================================
--- packages/sabnzbdplus/trunk/debian/sabnzbdplus.init 2011-03-04 20:57:37 UTC (rev 6728)
+++ packages/sabnzbdplus/trunk/debian/sabnzbdplus.init 2011-03-04 21:35:24 UTC (rev 6729)
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# Copyright (C) 2008-2010 by JCF Ploemen <linux at jp.pp.ru>
+# Copyright (C) 2008-2011 by JCF Ploemen <linux at jp.pp.ru>
# released under GPL, version 2 or later
################################################
@@ -48,7 +48,7 @@
is_running() {
# returns 0 when running, 1 otherwise
- PID="$(pgrep -f -x -u $USER "$PYTHONEXEC $DAEMON $DEFOPTS.*")"
+ PID="$(pgrep -f -x -u ${USER%:*} "$PYTHONEXEC $DAEMON $DEFOPTS.*")"
RET=$?
[ $RET -gt 1 ] && exit 1 || return $RET
}
@@ -60,6 +60,7 @@
[ -z "$USER" ] && {
log_warning_msg "$DESC: not configured, aborting. See $SETTINGS";
return 1; }
+ [ -z "${USER%:*}" ] && exit 1
OPTIONS="$DEFOPTS"
[ -n "$CONFIG" ] && OPTIONS="$OPTIONS --config-file $CONFIG"
@@ -80,7 +81,7 @@
check_retval
# create a pidfile; we don't use it but some monitoring app likes to have one
[ -w $(dirname $PIDFILE) ] && \
- pgrep -f -x -n -u $USER "$PYTHONEXEC $DAEMON $OPTIONS" > $PIDFILE
+ pgrep -f -x -n -u ${USER%:*} "$PYTHONEXEC $DAEMON $OPTIONS" > $PIDFILE
else
log_success_msg "$DESC: already running (pid $PID)"
fi
@@ -89,12 +90,12 @@
stop_sab() {
load_settings || exit 0
if is_running; then
- TMPFILE=$(mktemp /tmp/sabnzbdplus.XXXXXXXXXX)
+ TMPFILE=$(mktemp --tmpdir sabnzbdplus.XXXXXXXXXX)
[ $? -eq 0 ] || exit 1
trap '[ -f $TMPFILE ] && rm -f $TMPFILE' EXIT
echo "$PID" > $TMPFILE
log_daemon_msg "Stopping $DESC"
- start-stop-daemon --stop --user $USER --pidfile $TMPFILE --retry 30
+ start-stop-daemon --stop --user ${USER%:*} --pidfile $TMPFILE --retry 30
check_retval
else
log_success_msg "$DESC: not running"
More information about the Python-apps-commits
mailing list