diff options
Diffstat (limited to 'net/boinc-client/files/boinc.sh')
-rw-r--r-- | net/boinc-client/files/boinc.sh | 60 |
1 files changed, 3 insertions, 57 deletions
diff --git a/net/boinc-client/files/boinc.sh b/net/boinc-client/files/boinc.sh index 77fc535ab612..e8ab909b7fe7 100644 --- a/net/boinc-client/files/boinc.sh +++ b/net/boinc-client/files/boinc.sh @@ -1,61 +1,7 @@ #!/bin/sh -# -# $FreeBSD: /tmp/pcvs/ports/net/boinc-client/files/Attic/boinc.sh,v 1.1 2004-10-16 19:29:30 pav Exp $ -# -# Start or stop BOINC -# -. /etc/rc.subr +export LD_LIBRARY_PATH=%%LOCALBASE%%/lib/boinc -name="boinc" -rcvar=`set_rcvar` - -boinc_user=%%BOINC_USER%% -boinc_home=%%BOINC_HOME%% -program_file=%%BOINC_BINARY%% -program_path=%%BOINC_DATADIR%%/client/${program_file} - -[ -z "$boinc_enable" ] && boinc_enable="NO" - -load_rc_config $name - -case "$1" in -start) - if checkyesno boinc_enable - then - if [ ! -x ${program_path} ] - then - logger -sp ${syslog_facility} -t ${program_file} \ - "unable to start: ${program_path} is missing." - exit 72 - fi - if ps axo ucomm | egrep ${program_file}; then - logger -sp ${syslog_facility} -t ${program_file} \ - "unable to start: ${program_file} is already running." - exit 72 - fi - echo -n "BOINC " - idprio 31 su - ${boinc_user} -c "${program_path} >/dev/null &" - fi - ;; - -stop) - program=`expr ${program_file} : '^\(...................\).*$'` - killall ${program} 2> /dev/null - ;; - -restart) - $0 stop - $0 start - ;; - -status) - ps auxww | egrep ${program_file} | egrep -v "($0|egrep)" - ;; - -*) - echo "usage: ${name} {start|stop|restart|status}" >&2 - exit 64 - ;; -esac +args=${@+"$@"} +exec idprio 31 su - %%BOINC_USER%% -c "%%LOCALBASE%%/lib/boinc/%%BOINC_BINARY%% $args" |