[Python-apps-commits] r2545 - in packages/sabnzbdplus/trunk/debian (4 files)

jcfp-guest at users.alioth.debian.org jcfp-guest at users.alioth.debian.org
Fri Mar 6 20:28:48 UTC 2009


    Date: Friday, March 6, 2009 @ 20:28:47
  Author: jcfp-guest
Revision: 2545

Install as private module + assorted improvements

Modified:
  packages/sabnzbdplus/trunk/debian/patches/02_find_parts_in_usr_share.dpatch
  packages/sabnzbdplus/trunk/debian/sabnzbdplus.init
  packages/sabnzbdplus/trunk/debian/sabnzbdplus.install
Deleted:
  packages/sabnzbdplus/trunk/debian/sabnzbdplus.preinst

Modified: packages/sabnzbdplus/trunk/debian/patches/02_find_parts_in_usr_share.dpatch
===================================================================
--- packages/sabnzbdplus/trunk/debian/patches/02_find_parts_in_usr_share.dpatch	2009-03-06 19:57:45 UTC (rev 2544)
+++ packages/sabnzbdplus/trunk/debian/patches/02_find_parts_in_usr_share.dpatch	2009-03-06 20:28:47 UTC (rev 2545)
@@ -5,12 +5,23 @@
 ## DP: make the program find the interface templates under /usr/share
 
 @DPATCH@
-diff -urNad sabnzbdplus-0.4.0~beta2~/sabnzbd/constants.py sabnzbdplus-0.4.0~beta2/sabnzbd/constants.py
---- sabnzbdplus-0.4.0~beta2~/sabnzbd/constants.py	2008-04-07 23:34:01.000000000 +0200
-+++ sabnzbdplus-0.4.0~beta2/sabnzbd/constants.py	2008-04-07 23:35:05.000000000 +0200
-@@ -58,7 +58,7 @@
+diff -urNad sabnzbdplus-0.4.7~/SABnzbd.py sabnzbdplus-0.4.7/SABnzbd.py
+--- sabnzbdplus-0.4.7~/SABnzbd.py	2009-02-21 11:45:21.000000000 +0100
++++ sabnzbdplus-0.4.7/SABnzbd.py	2009-03-06 18:23:20.000000000 +0100
+@@ -41,6 +41,7 @@
+ 
+ import cherrypy
+ 
++sys.path.insert(0,'/usr/share/sabnzbdplus')
+ import sabnzbd
+ from sabnzbd.utils.configobj import ConfigObj, ConfigObjError
+ from sabnzbd.__init__ import check_setting_str, check_setting_int, dir_setup
+diff -urNad sabnzbdplus-0.4.7~/sabnzbd/constants.py sabnzbdplus-0.4.7/sabnzbd/constants.py
+--- sabnzbdplus-0.4.7~/sabnzbd/constants.py	2009-03-06 18:22:22.000000000 +0100
++++ sabnzbdplus-0.4.7/sabnzbd/constants.py	2009-03-06 18:22:22.000000000 +0100
+@@ -60,7 +60,7 @@
+ DEF_CACHE_DIR    = 'cache'
  DEF_LOG_DIR      = 'logs'
- DEF_NZB_DIR      = ''
  DEF_NZBBACK_DIR  = ''
 -DEF_INTERFACES   = 'interfaces'
 +DEF_INTERFACES   = '../share/sabnzbdplus/interfaces'

Modified: packages/sabnzbdplus/trunk/debian/sabnzbdplus.init
===================================================================
--- packages/sabnzbdplus/trunk/debian/sabnzbdplus.init	2009-03-06 19:57:45 UTC (rev 2544)
+++ packages/sabnzbdplus/trunk/debian/sabnzbdplus.init	2009-03-06 20:28:47 UTC (rev 2545)
@@ -13,11 +13,14 @@
 ### END INIT INFO
 
 DAEMON=/usr/bin/sabnzbdplus
+
+[ -x $DAEMON ] || exit 1
+
 NAME=$(basename $DAEMON)
 DESC="SABnzbd+ binary newsgrabber"
 SETTINGS=/etc/default/sabnzbdplus
 OPTIONS="--daemon"
-PYTHONEXEC="$(readlink -f /usr/bin/python)"
+PYTHONEXEC="$(readlink -f $(sed -n -e "1s/^#\!\([a-z0-9\.\/]\+\).*/\1/p" $DAEMON))"
 
 . /lib/lsb/init-functions
 
@@ -47,8 +50,6 @@
 	[ -n "$CONFIG" ] && OPTIONS="$OPTIONS --config-file $CONFIG"
 	[ -n "$HOST" -a -n "$PORT" ] && OPTIONS="$OPTIONS --server $HOST:$PORT"
 	[ -n "$EXTRAOPTS" ] && OPTIONS="$OPTIONS $EXTRAOPTS"
-
-	[ -x $DAEMON ] || exit 1
 }
 
 case "$1" in

Modified: packages/sabnzbdplus/trunk/debian/sabnzbdplus.install
===================================================================
--- packages/sabnzbdplus/trunk/debian/sabnzbdplus.install	2009-03-06 19:57:45 UTC (rev 2544)
+++ packages/sabnzbdplus/trunk/debian/sabnzbdplus.install	2009-03-06 20:28:47 UTC (rev 2545)
@@ -4,7 +4,7 @@
 interfaces/Default/templates /usr/share/sabnzbdplus/interfaces/Default/
 
 # python stuff
-sabnzbd /usr/share/python-support/sabnzbd/
+sabnzbd /usr/share/sabnzbdplus/
 
 # executable
 SABnzbd.py /usr/bin

Deleted: packages/sabnzbdplus/trunk/debian/sabnzbdplus.preinst
===================================================================
--- packages/sabnzbdplus/trunk/debian/sabnzbdplus.preinst	2009-03-06 19:57:45 UTC (rev 2544)
+++ packages/sabnzbdplus/trunk/debian/sabnzbdplus.preinst	2009-03-06 20:28:47 UTC (rev 2545)
@@ -1,14 +0,0 @@
-#!/bin/sh
-
-set -e
-
-#DEBHELPER#
-
-if [ "$1" = "upgrade" ]; then
-	if [ $(pgrep -c -f '/usr/bin/sabnzbdplus') -gt 0 ]; then
-		echo "Terminating all running instances of sabnzbdplus ..."
-		pkill -f '/usr/bin/sabnzbdplus' || true
-	fi
-fi
-
-exit 0




More information about the Python-apps-commits mailing list