You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/net-nntp/nzbget/files/nzbget.initd

35 lines
835 B

#!/sbin/runscript
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
extra_started_commands="pause unpause"
start() {
ebegin "Starting nzbget"
checkpath -d -m 0755 -o "${NZBGET_USER}:${NZBGET_GROUP}" /run/nzbget
start-stop-daemon --quiet --start --user "${NZBGET_USER}" \
--group "${NZBGET_GROUP}" --exec /usr/bin/nzbget -- \
--configfile "${NZBGET_CONFIGFILE}" --daemon \
${NZBGET_OPTS}
eend $?
}
stop() {
ebegin "Stopping nzbget"
/usr/bin/nzbget --configfile "${NZBGET_CONFIGFILE}" --quit >/dev/null
eend $?
}
pause() {
ebegin "Pausing nzbget"
/usr/bin/nzbget --configfile "${NZBGET_CONFIGFILE}" --pause >/dev/null
eend $?
}
unpause() {
ebegin "Unpausing nzbget"
/usr/bin/nzbget --configfile "${NZBGET_CONFIGFILE}" --unpause >/dev/null
eend $?
}