2018-11-14 07:59:34 +00:00
|
|
|
#!/sbin/openrc-run
|
|
|
|
|
2019-10-30 03:34:09 +00:00
|
|
|
SVCNAME=xsd
|
|
|
|
XSD_PIDFILE=/var/run/xsd.pid
|
|
|
|
XSD_USER=root
|
|
|
|
XSD_HOME=/var/run
|
2018-11-14 07:59:34 +00:00
|
|
|
INST_PREFIX=/usr/local
|
2019-10-30 03:34:09 +00:00
|
|
|
COMMAND=$INST_PREFIX/sbin/xsd
|
2021-11-16 01:57:01 +00:00
|
|
|
ARGS="-L -aK K_all -aC C_all -aH H_all"
|
2018-11-14 07:59:34 +00:00
|
|
|
|
|
|
|
depend() {
|
|
|
|
need net
|
|
|
|
use dns logger
|
|
|
|
}
|
|
|
|
|
|
|
|
checkconfig() {
|
|
|
|
if [ ! -f "$COMMAND" ] ; then
|
|
|
|
eerror "$COMMAND not installed" || return 1
|
|
|
|
fi
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
|
|
|
start() {
|
|
|
|
checkconfig || return 1
|
|
|
|
|
|
|
|
ebegin "Starting ${SVCNAME}"
|
|
|
|
start-stop-daemon \
|
2019-10-30 03:34:09 +00:00
|
|
|
-d ${XSD_HOME} \
|
|
|
|
--make-pidfile --pidfile ${XSD_PIDFILE} \
|
2018-11-14 07:59:34 +00:00
|
|
|
--start --quiet --background \
|
2021-11-16 01:57:01 +00:00
|
|
|
--exec "${COMMAND}" -- ${ARGS}
|
2018-11-14 07:59:34 +00:00
|
|
|
eend $?
|
|
|
|
}
|
|
|
|
|
|
|
|
stop() {
|
|
|
|
ebegin "Stopping ${SVCNAME}"
|
2019-10-30 03:34:09 +00:00
|
|
|
start-stop-daemon --stop --quiet --pidfile $XSD_PIDFILE
|
2018-11-14 07:59:34 +00:00
|
|
|
eend $?
|
|
|
|
}
|