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/app-misc/conmux/files/conmux.initd

33 lines
727 B

#!/sbin/runscript
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
checkconfig() {
if [[ ! -f ${CONMUX_CONFIG} ]]; then
eerror ""
eerror "No conmux configuration file was found!"
eerror "Please read the conmux README file."
eerror ""
return 1
fi
# Sane default
if [[ -z ${CONMUX_LOG} ]]; then
CONMUX_LOG="/var/log/conmux.log"
fi
return 0
}
start() {
checkconfig || exit 1
ebegin "Starting CONMUX daemon"
start-stop-daemon -b --start -1 ${CONMUX_LOG} \
-2 ${CONMUX_LOG} -p /run/conmux.pid \
--exec /usr/sbin/conmux -- ${CONMUX_CONFIG}
}
stop() {
ebegin "Stopping CONMUX daemon"
start-stop-daemon --stop --pidfile /run/conmux.pid
eend $?
}