ok, I put the kannel startup file in /etc/init.d, created a user called
kannel and did a manual

============================================================================
=======================
Kannel start
============================================================================
=======================
And I got an error:

============================================================================
=======================
Starting kannel gateway: bearerboxsudo: start-stop-daemon: command not found
 smsboxsudo: start-stop-daemon: command not found
  [OKAY]
============================================================================
=======================

My kannel startup script is:

============================================================================
=======================
#!/bin/sh
# Start/stop the Kannel boxes: One bearer box and one WAP box.

# This is the default init.d script for Kannel.  Its configuration is
# appropriate for a small site running Kannel on one machine.

# Make sure that the Kannel binaries can be found in $BOXPATH or somewhere
# else along $PATH.  run_kannel_box has to be in $BOXPATH.

### BEGIN INIT INFO
# Provides:          kannel
# Required-Start:    $syslog
# Required-Stop:     $syslog
# Should-Start:      $local_fs $network
# Should-Stop:       $local_fs $network
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: SMS and WAP gateway
# Description:       Kannel is a gateway for connecting WAP phones to the
#                    Internet. It also works as an SMS gateway.
### END INIT INFO

BOXPATH=/usr/local/kannel/sbin
PIDFILES=/var/kannel
CONF=/etc/kannel/smskannel.conf

USER=kannel
VERSION=""

RB=run_kannel_box
BB=bearerbox
WB=wapbox
SB=smsbox
SSD=start-stop-daemon

PATH=$BOXPATH:$PATH

#
# Peter added this part to change mod and ownership of /dev/ttyS0
#
#chown root.modem /dev/ttyS0
#chmod 660 /dev/ttyS0

# On Debian, the most likely reason for the bearerbox not being available
# is that the package is in the "removed" or "unconfigured" state, and the
# init.d script is still around because it's a conffile.  This is normal,
# so don't generate any output.
test -x $BOXPATH/bearerbox || exit 0
test -r /etc/default/kannel && . /etc/default/kannel

case "$1" in
  start)
    echo -n "Starting kannel gateway: bearerbox"

    sudo -u $USER $SSD --start --quiet \
        --pidfile $PIDFILES/kannel_bearerbox.pid \
        --exec $BOXPATH/$RB \
        -- \
        --pidfile $PIDFILES/kannel_bearerbox.pid \
        --no-extra-args \
        $BOXPATH/$BB -v 4 -- $CONF
    echo -n " smsbox"
    sudo -u $USER $SSD --start --quiet \
        --pidfile $PIDFILES/kannel_smsbox.pid \
        --exec $BOXPATH/$RB \
        -- \
        --pidfile $PIDFILES/kannel_smsbox.pid \
        --no-extra-args \
        $BOXPATH/$SB -v 4 -- $CONF
    echo "  [OKAY]"
    ;;

stop)
    echo -n "Stopping WAP gateway:"
    test ! -z $START_SMSBOX && (
        echo -n " smsbox"
        start-stop-daemon --stop --retry 5 --quiet \
            --pidfile $PIDFILES/kannel_smsbox.pid \
            --exec $BOXPATH/run_kannel_box
    )
    test ! -z $START_WAPBOX && (
        echo -n " wapbox"
        start-stop-daemon --stop --retry 5 --quiet \
            --pidfile $PIDFILES/kannel_wapbox.pid \
            --exec $BOXPATH/run_kannel_box
    )
    echo -n " bearerbox"
    start-stop-daemon --stop --retry 5 --quiet \
        --pidfile $PIDFILES/kannel_bearerbox.pid \
        --exec $BOXPATH/run_kannel_box
    echo "."
    ;;

  reload)
    # We don't have support for this yet.
 exit 1
    ;;

  restart|force-reload)
    $0 stop
    sleep 1
    $0 start
    ;;

*)
echo "Usage: $0 {start|stop|reload|restart|force-reload}"
    exit 1

esac

exit 0

============================================================================
=======================
What is wring here?

-----Original Message-----
From: Peter Lum [mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 16, 2007 5:27 PM
To: [email protected]
Subject: Install Kannel on Centos 4.5

Hi

I just got my server up on Centos and trying to install Kannel

I got pass the config/compile with no errors but I can seem to proceed from
here.

First of all, am I right that all the startup scripts should be put in

/etc/rc.d/init.d/

Should I put kannel startup script there?

Also, can I use chkconfig to add kannel to the startup script?

Like,

Chkconfig --add kannel ?

And what runlevel should I set it?

Thanks and hope someone would help me......

Peter






Reply via email to