From 7b4924dd7a8670e2cea3a462edb1a60e640321e1 Mon Sep 17 00:00:00 2001 From: ikkemaniac Date: Sat, 5 Jan 2013 16:09:52 +0100 Subject: [PATCH] Don't influence the PATH variable in FreeBSD rc script Don't prepend the PATH variable, it's ugly, unwanted and unnecessary. Call binaries with their full path. --- init/freebsd | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/init/freebsd b/init/freebsd index 662b09fa..bb9581db 100755 --- a/init/freebsd +++ b/init/freebsd @@ -25,9 +25,6 @@ name="couchpotato" rcvar=${name}_enable -# Required, for some reason, to find all our binaries when starting via service. -PATH="/usr/bin:/usr/local/bin:$PATH" - load_rc_config ${name} : ${couchpotato_enable:="NO"} @@ -38,17 +35,12 @@ load_rc_config ${name} : ${couchpotato_conf:="${couchpotato_dir}/data/settings.conf"} WGET="/usr/local/bin/wget" # You need wget for this script to safely shutdown CouchPotato. -if [ -e "${couchpotato_conf}" ]; then - HOST=`grep -A14 "\[core\]" "${couchpotato_conf}"|awk -F" = " '/^host/ {print $2}'` - PORT=`grep -A14 "\[core\]" "${couchpotato_conf}"|awk -F" = " '/^port/ {print $2}'` - CPAPI=`grep -A14 "\[core\]" "${couchpotato_conf}"|awk -F" = " '/^api_key/ {print $2}'` -fi status_cmd="${name}_status" stop_cmd="${name}_stop" command="/usr/sbin/daemon" -command_args="-f -p ${couchpotato_pid} python ${couchpotato_dir}/CouchPotato.py ${couchpotato_flags}" +command_args="-f -p ${couchpotato_pid} /usr/local/bin/python ${couchpotato_dir}/CouchPotato.py ${couchpotato_flags}" start_cmd="${command} ${command_args}" # Check for wget and refuse to start without it.