aboutsummaryrefslogtreecommitdiff
path: root/www/kannel
diff options
context:
space:
mode:
authorMartin Wilke <miwi@FreeBSD.org>2007-06-09 22:10:22 +0000
committerMartin Wilke <miwi@FreeBSD.org>2007-06-09 22:10:22 +0000
commit6a250d8a3d1eab469e7e0ed13fe2b1bc3711f9c7 (patch)
tree7da87a987ded0215c21804aa7e45a39c33abe39a /www/kannel
parentc32952a6b0f4cd49cd62e9f7f66473c18ca7dd94 (diff)
downloadports-6a250d8a3d1eab469e7e0ed13fe2b1bc3711f9c7.tar.gz
ports-6a250d8a3d1eab469e7e0ed13fe2b1bc3711f9c7.zip
Notes
Diffstat (limited to 'www/kannel')
-rw-r--r--www/kannel/Makefile1
-rw-r--r--www/kannel/files/kannel.in76
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"
+