#!/sbin/runscript # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 checkconfig() { # Set sane defaults if [[ -z ${CONMUX_REGISTRY_PORT} ]]; then CONMUX_REGISTRY_PORT="63000" fi if [[ -z ${CONMUX_REGISTRY_LOG} ]]; then CONMUX_REGISTRY_LOG="/var/log/conmux-registry.log" fi } start() { checkconfig ebegin "Starting conmux daemon" touch ${CONMUX_REGISTRY_LOG} ${CONMUX_REGISTRY_FILE} start-stop-daemon -b --start -p /run/conmux-registry.pid \ --exec /usr/sbin/conmux-registry \ ${CONMUX_REGISTRY_PORT} ${CONMUX_REGISTRY_FILE} } stop() { ebegin "Stopping conmux daemon" start-stop-daemon --stop --pidfile /run/conmux-registry.pid eend $? }