2016-02-11 11:17:28 +01:00
|
|
|
#!/sbin/openrc-run
|
2017-12-21 14:45:35 +01:00
|
|
|
# Copyright 1999-2017 Gentoo Foundation
|
2014-03-18 11:00:56 +01:00
|
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
|
|
|
|
LOGFILE=/var/log/spectrum2/std.log
|
|
|
|
|
|
|
|
depend() {
|
|
|
|
need net
|
|
|
|
}
|
|
|
|
|
|
|
|
start() {
|
|
|
|
[ -d /var/run/spectrum2 ] || mkdir /var/run/spectrum2 && chown jabber:jabber /var/run/spectrum2 && chmod 750 /var/run/spectrum2
|
|
|
|
ebegin "Starting ${PROTOCOL} Spectrum Transport"
|
|
|
|
start-stop-daemon --start --user jabber --group jabber \
|
|
|
|
--exec /usr/bin/spectrum2_manager start &> $LOGFILE
|
|
|
|
eend $?
|
|
|
|
}
|
|
|
|
|
|
|
|
stop() {
|
|
|
|
ebegin "Stopping ${PROTOCOL} Spectrum Transport"
|
|
|
|
start-stop-daemon --user jabber --group jabber \
|
|
|
|
--exec /usr/bin/spectrum2_manager stop 1>>$LOGFILE 2>&1
|
|
|
|
eend $?
|
|
|
|
}
|