diff options
Diffstat (limited to 'chat/jabberd2/files/s2s.sh')
-rwxr-xr-x | chat/jabberd2/files/s2s.sh | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/chat/jabberd2/files/s2s.sh b/chat/jabberd2/files/s2s.sh new file mode 100755 index 00000000000..2ec0a998c86 --- /dev/null +++ b/chat/jabberd2/files/s2s.sh @@ -0,0 +1,35 @@ +#!@RCD_SCRIPTS_SHELL@ +# +# $NetBSD: s2s.sh,v 1.1.1.1 2004/03/28 19:44:07 xtraeme Exp $ +# +# PROVIDE: s2s +# REQUIRE: DAEMON c2s + +if [ -f /etc/rc.subr ]; then + . /etc/rc.subr +fi + +name="s2s" +rcvar=$name +command="@PREFIX@/bin/${name}" +required_files="@PKG_SYSCONFDIR@/${name}.xml" +extra_commands="reload" +command_args="2>&1 > /dev/null &" +s2s_user="@JABBERD_USER@" +pidfile="@JABBERD_PIDDIR@/${name}.pid" +stop_postcmd="remove_pidfile" + +remove_pidfile() +{ + if [ -f @JABBERD_PIDDIR@/${name}.pid ]; then + rm -f @JABBERD_PIDDIR@/${name}.pid + fi +} + +if [ -f /etc/rc.subr ]; then + load_rc_config $name + run_rc_command "$1" +else + @ECHO@ -n " ${name}" + ${command} ${s2s_flags} ${command_args} +fi |