diff options
author | miwi <miwi@FreeBSD.org> | 2007-06-10 06:10:22 +0800 |
---|---|---|
committer | miwi <miwi@FreeBSD.org> | 2007-06-10 06:10:22 +0800 |
commit | a5a7d7ca2c5b0d95937588d6d7ad6d1bad75e412 (patch) | |
tree | b222bd4159257559ad656a95a07cf092cd133edb /www/kannel | |
parent | 7e107517679cbc7ddc66504548b57eadf8cc98dd (diff) | |
download | freebsd-ports-gnome-a5a7d7ca2c5b0d95937588d6d7ad6d1bad75e412.tar.gz freebsd-ports-gnome-a5a7d7ca2c5b0d95937588d6d7ad6d1bad75e412.tar.zst freebsd-ports-gnome-a5a7d7ca2c5b0d95937588d6d7ad6d1bad75e412.zip |
- Add rc script
Submitted by: Antony Halse <g.halse@ru.ac.za>
Approved by: maintainer implicit
Diffstat (limited to 'www/kannel')
-rw-r--r-- | www/kannel/Makefile | 1 | ||||
-rw-r--r-- | www/kannel/files/kannel.in | 76 |
2 files changed, 77 insertions, 0 deletions
diff --git a/www/kannel/Makefile b/www/kannel/Makefile index 524e458c0a78..033b78b6d843 100644 --- a/www/kannel/Makefile +++ b/www/kannel/Makefile @@ -17,6 +17,7 @@ COMMENT= WAP / SMS Gateway LIB_DEPENDS= pcre.0:${PORTSDIR}/devel/pcre +USE_RC_SUBR= kannel USE_GNOME= libxml2 USE_OPENSSL= yes USE_GMAKE= yes diff --git a/www/kannel/files/kannel.in b/www/kannel/files/kannel.in new file mode 100644 index 000000000000..0f11671b9be2 --- /dev/null +++ b/www/kannel/files/kannel.in @@ -0,0 +1,76 @@ +#!/bin/sh +# PROVIDE: kannel_smsbox kannel_wapbox kannel_bearerbox +# REQUIRE: NETWORKING SERVERS +# BEFORE: LOGIN +# KEYWORD: shutdown + +. %%RC_SUBR%% + +name=kannel +rcvar=`set_rcvar` +command="%%PREFIX%%/sbin/run_kannel_box" +extra_commands="reload" +sig_reload=SIGUSR1 + +load_rc_config $name +# Set defaults +kannel_config=${kannel_config:-"%%PREFIX%%/etc/kannel.conf"} +kannel_user=${kannel_user:-"kannel"} +# Config file is required +if [ ! -r ${kannel_config} ]; then + warn "${kannel_config} is not readable." + case $1 in + force*) : ;; + *) exit 1 ;; + esac +fi + +if test -n ${kannel_enable:-""} && checkyesno kannel_enable; then + kannel_bearerbox_enable=${kannel_bearerbox_enable:-"YES"} + kannel_smsbox_enable=${kannel_smsbox_enable:-"YES"} + kannel_wapbox_enable=${kannel_wapbox_enable:-"YES"} +fi + +# bearerbox +name=kannel_bearerbox +rcvar=`set_rcvar` +pidfile=/var/run/kannel/${name}.pid +# Defaults +kannel_bearerbox_user=${kannel_bearerbox_user:-"${kannel_user}"} +kannel_bearerbox_enable=${kannel_bearerbox_enable:-"NO"} +kannel_bearerbox_config=${kannel_bearerbox_config:-"${kannel_config}"} +kannel_bearerbox_flags=${kannel_bearerbox_flags:-"--pidfile ${pidfile} %%PREFIX%%/sbin/bearerbox ${kannel_bearerbox_flags} ${kannel_bearerbox_config}"} +# +load_rc_config $name +run_rc_command "$1" +# +_rc_restart_done=false + +# smsbox +name=kannel_smsbox +rcvar=`set_rcvar` +pidfile=/var/run/kannel/${name}.pid +# Defaults +kannel_smsbox_user=${kannel_smsbox_user:-"${kannel_user}"} +kannel_smsbox_enable=${kannel_smsbox_enable:-"NO"} +kannel_smsbox_config=${kannel_smsbox_config:-"${kannel_config}"} +kannel_smsbox_flags=${kannel_smsbox_flags:-"--pidfile ${pidfile} %%PREFIX%%/sbin/smsbox ${kannel_smsbox_flags} ${kannel_smsbox_config}"} +# +load_rc_config $name +run_rc_command "$1" +# +_rc_restart_done=false + +# wapbox +name=kannel_wapbox +rcvar=`set_rcvar` +pidfile=/var/run/kannel/${name}.pid +# Defaults +kannel_wapbox_user=${kannel_wapbox_user:-"${kannel_user}"} +kannel_wapbox_enable=${kannel_wapbox_enable:-"NO"} +kannel_wapbox_config=${kannel_wapbox_config:-"${kannel_config}"} +kannel_wapbox_flags=${kannel_wapbox_flags:-"--pidfile ${pidfile} %%PREFIX%%/sbin/wapbox ${kannel_wapbox_flags} ${kannel_wapbox_config}"} +# +load_rc_config $name +run_rc_command "$1" + |