blob: c034a28ada112c6944a65b6e34b30d93b9977df9 (
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
|
#!/sbin/openrc-run
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
depend() {
use dns
need net
}
PIDFILE=/var/run/${RC_SVCNAME}.pid
start() {
ebegin "Starting nmdcredir ${RC_SVCNAME}"
if [ -z ${NMDCREDIR_HUBN} ]; then
start-stop-daemon --start --pidfile "${PIDFILE}" -u ${NMDCREDIR_USER}:${NMDCREDIR_GROUP} -m -b /usr/bin/nmdcredir -- "${NMDCREDIR_PORT}" "${NMDCREDIR_ADDR}"
else
start-stop-daemon --start --pidfile "${PIDFILE}" -u ${NMDCREDIR_USER}:${NMDCREDIR_GROUP} -m -b /usr/bin/nmdcredir -- "${NMDCREDIR_PORT}" "${NMDCREDIR_ADDR}" \
"${NMDCREDIR_HUBN}" "${NMDCREDIR_MESS}"
fi
eend $?
}
stop() {
ebegin "Stopping nmdcredir ${RC_SVCNAME}"
start-stop-daemon --stop --pidfile "${PIDFILE}"
eend $?
}
|