blob: 5af904210bbe168ff81881e0e07da53f5b084013 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
#!/sbin/runscript
# Copyright 1999-2014 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
# Make sure conmux finds everything
export PATH="${PATH}:/usr/share/conmux/drivers:/usr/share/conmux/helpers"
ebegin "Starting conmux registry daemon"
[ -e ${CONMUX_REGISTRY_LOG} ] && rm ${CONMUX_REGISTRY_LOG}
touch ${CONMUX_REGISTRY_LOG}
start-stop-daemon -b -m --start -p /run/conmux-registry.pid \
--exec /usr/sbin/conmux-registry -- ${CONMUX_REGISTRY_PORT} \
${CONMUX_REGISTRY_LOG}
}
stop() {
ebegin "Stopping conmux registry daemon"
start-stop-daemon --stop --pidfile /run/conmux-registry.pid
eend $?
}
|