#!/sbin/runscript
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
extra_started_commands="attach"
fi
ebegin "Starting ${SVCNAME}"
- su -m ${USER} -c "nice -n ${NICELEVEL} \"${BOINCBIN}\" ${ARGS} --daemon --dir \"${RUNTIMEDIR}\" --redirectio"
+ start-stop-daemon -S -N ${NICELEVEL} -u ${USER} -q -x "${BOINCBIN}" -- ${ARGS} --daemon --dir "${RUNTIMEDIR}" --redirectio
eend $?
}
password=$(cat "${RUNTIMEDIR}/gui_rpc_auth.cfg")
ebegin "${SVCNAME}: Attaching to project"
- su -m ${USER} -c "boinccmd --passwd \"${password}\" --project_attach ${url} ${key}"
+ start-stop-daemon -u ${USER} -q -x boinccmd -- --passwd "${password}" --project_attach ${url} ${key}
eend $?
unset password url key
password=$(cat "${RUNTIMEDIR}/gui_rpc_auth.cfg")
ebegin "Stopping ${SVCNAME}"
- su -m ${USER} -c "boinccmd --passwd \"${password}\" --quit"
+ start-stop-daemon -u ${USER} -q -x boinccmd -- --passwd "${password}" --quit
eend $?
unset password