#!/bin/sh # PROVIDE: kannel_smsbox kannel_wapbox kannel_bearerbox # REQUIRE: NETWORKING SERVERS # BEFORE: LOGIN # KEYWORD: shutdown . /etc/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"