diff options
Diffstat (limited to 'chat/spectrum/files/spectrum.sh')
-rw-r--r-- | chat/spectrum/files/spectrum.sh | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/chat/spectrum/files/spectrum.sh b/chat/spectrum/files/spectrum.sh new file mode 100644 index 00000000000..13101a9ab54 --- /dev/null +++ b/chat/spectrum/files/spectrum.sh @@ -0,0 +1,35 @@ +#!@RCD_SCRIPTS_SHELL@ +# +# $NetBSD: spectrum.sh,v 1.1.1.1 2011/02/07 06:31:22 schnoebe Exp $ +# +# startup script for the spectrum jabber transport service +# +# PROVIDE: spectrum +# REQUIRE: DAEMON s2s +# +if [ -f /etc/rc.subr ]; then + . /etc/rc.subr +fi + +name="spectrum" +rcvar="$name" +procname="$name" +command=@PREFIX@/bin/spectrumctl + +start_cmd="$command start" +restart_cmd="$command restart" +stop_cmd="$command stop" + +ensure_piddir() +{ + mkdir -p @JABBER_PIDDIR@ @JABBER_LOGDIR@ + chown @JABBER_USER@ @JABBER_PIDDIR@ @JABBER_LOGDIR@ +} + +if [ -f /etc/rc.subr ]; then + load_rc_config $name + run_rc_command "$1" +else + @ECHO@ -n " ${name}" + ${command} $1 +fi |