mirror of
https://anongit.gentoo.org/git/repo/gentoo.git
synced 2025-12-18 16:08:17 +00:00
I just pushed a new version so not worrying about revbump. Closes: https://bugs.gentoo.org/848915 Signed-off-by: Sam James <sam@gentoo.org>
41 lines
929 B
Text
41 lines
929 B
Text
#!/sbin/openrc-run
|
|
# Copyright 1999-2007 Gentoo Foundation
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
depend() {
|
|
need net oidentd
|
|
}
|
|
|
|
check_config() {
|
|
if [ ! -f ${PSYBNC_CONFIG} ]
|
|
then
|
|
eerror "Please set \$PSYBNC_CONFIG in /etc/conf.d/psybnc!"
|
|
return 1
|
|
fi
|
|
|
|
if [ ! -d "${PSYBNC_HOME}" ]
|
|
then
|
|
eerror "Please set \$PSYBNC_HOME in /etc/conf.d/psybnc!"
|
|
return 1
|
|
fi
|
|
|
|
if [ -z "${PSYBNC_USER}" ]
|
|
then
|
|
eerror "Please set \$PSYBNC_USER in /etc/conf.d/psybnc!"
|
|
return 1
|
|
fi
|
|
}
|
|
|
|
start() {
|
|
check_config || return 1
|
|
ebegin "Starting psyBNC"
|
|
start-stop-daemon --start --quiet --chuid "${PSYBNC_USER}" --chdir "${PSYBNC_HOME}" -e HOME="${PSYBNC_HOME}" --exec /usr/bin/psybnc -- "${PSYBNC_CONFIG}" >/dev/null 2>&1
|
|
eend $?
|
|
}
|
|
|
|
stop() {
|
|
check_config || return 1
|
|
ebegin "Stopping psyBNC"
|
|
start-stop-daemon --stop --quiet --pidfile "${PSYBNC_HOME}"/psybnc.pid --signal 9
|
|
eend $?
|
|
}
|