blob: 75f53de4445f4e1c6d7d1bdb9af8d5ee41567a6d (
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
32
|
#!/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 $?
}
|