aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorswills <swills@FreeBSD.org>2013-05-31 01:18:21 +0800
committerswills <swills@FreeBSD.org>2013-05-31 01:18:21 +0800
commit892094a73ab5b40299f1a5de461ff34544896e65 (patch)
treeed247a5540ccd615bafd32f372f44ca642fa83db
parentec7cb2fd76818bccc5006c5f9021cf113546334a (diff)
downloadfreebsd-ports-gnome-892094a73ab5b40299f1a5de461ff34544896e65.tar.gz
freebsd-ports-gnome-892094a73ab5b40299f1a5de461ff34544896e65.tar.zst
freebsd-ports-gnome-892094a73ab5b40299f1a5de461ff34544896e65.zip
- Put back PATH setting, so that unrar and par2 are found, but only add it to
prestart - Bump PORTREVISION Reported by: flo Submitted by: "Mark Felder" <feld@feld.me> (maintainer, private email)
-rw-r--r--news/sabnzbdplus/Makefile1
-rw-r--r--news/sabnzbdplus/files/sabnzbd.in29
2 files changed, 16 insertions, 14 deletions
diff --git a/news/sabnzbdplus/Makefile b/news/sabnzbdplus/Makefile
index 49e432a98b32..15adbdb523ba 100644
--- a/news/sabnzbdplus/Makefile
+++ b/news/sabnzbdplus/Makefile
@@ -2,6 +2,7 @@
PORTNAME= sabnzbdplus
PORTVERSION= 0.7.12
+PORTREVISION= 1
CATEGORIES= news
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTVERSION}
DISTNAME= SABnzbd-${PORTVERSION}-src
diff --git a/news/sabnzbdplus/files/sabnzbd.in b/news/sabnzbdplus/files/sabnzbd.in
index 0ca329b0fce4..fbafb3e9b1f3 100644
--- a/news/sabnzbdplus/files/sabnzbd.in
+++ b/news/sabnzbdplus/files/sabnzbd.in
@@ -38,7 +38,15 @@ required_dirs=${sabnzbd_conf_dir}
start_cmd="${name}_start"
status_cmd="${name}_status"
stop_cmd="${name}_stop"
-start_precmd=sabnzbd_check_dir
+start_precmd="${name}_prestart"
+
+sabnzbd_prestart()
+{
+ PATH=${PATH}:%%PREFIX%%/bin:%%PREFIX%%/sbin
+ if [ ! -f "${required_dirs}" -a ! -d "${required_dirs}" -a ! -L "${required_dirs}" ]; then
+ install -d -o ${sabnzbd_user} -g ${sabnzbd_group} ${required_dirs}
+ fi
+}
sabnzbd_start()
{
@@ -81,19 +89,12 @@ sabnzbd_stop()
sabnzbd_status()
{
- sabnzbd_pid=`ps -U ${sabnzbd_user} | grep "python.*SABnzbd.py.*--daemon" | grep -v 'grep' | awk '{print $1}'`
- if [ -n "${sabnzbd_pid}" ]; then
- echo "$name is running as ${sabnzbd_pid}"
- else
- echo "$name is not running"
- fi
-}
-
-sabnzbd_check_dir()
-{
- if [ ! -f "${required_dirs}" -a ! -d "${required_dirs}" -a ! -L "${required_dirs}" ]; then
- install -d -o ${sabnzbd_user} -g ${sabnzbd_group} ${required_dirs}
- fi
+ sabnzbd_pid=`ps -U ${sabnzbd_user} | grep "python.*SABnzbd.py.*--daemon" | grep -v 'grep' | awk '{print $1}'`
+ if [ -n "${sabnzbd_pid}" ]; then
+ echo "$name is running as ${sabnzbd_pid}"
+ else
+ echo "$name is not running"
+ fi
}
run_rc_command "$1"