Hi Allison
 
This is my startup script:
#!/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/sbin
PIDFILES=/var/kannel
CONF=/etc/kannel/kannel.conf
 
PATH=$BOXPATH:$PATH
 
# 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 WAP gateway:"
    echo -n " bearerbox"
    start-stop-daemon --start --quiet \
        --pidfile $PIDFILES/kannel_bearerbox.pid \
        --chuid kannel \
        --exec $BOXPATH/run_kannel_box \
        -- \
        --pidfile $PIDFILES/kannel_bearerbox.pid \
        --no-extra-args \
        $BOXPATH/bearerbox -v 4 -- $CONF
    sleep 1 # Wait for bearerbox
    test ! -z $START_WAPBOX && (
    echo -n " wapbox"
        start-stop-daemon --start --quiet \
            --pidfile $PIDFILES/kannel_wapbox.pid \
            --chuid kannel \
            --exec $BOXPATH/run_kannel_box \
            -- \
            --pidfile $PIDFILES/kannel_wapbox.pid \
            --no-extra-args \
            $BOXPATH/wapbox -v 4 -- $CONF
    )
    test ! -z $START_SMSBOX && (
    echo -n " smsbox"
        start-stop-daemon --start --quiet \
            --pidfile $PIDFILES/kannel_smsbox.pid \
            --chuid kannel \
            --exec $BOXPATH/run_kannel_box \
            -- \
            --pidfile $PIDFILES/kannel_smsbox.pid \
            --no-extra-args \
            $BOXPATH/smsbox -v 4 -- $CONF
    )
    echo "."
    ;;
 
  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|restart|force-reload}"
    exit 1
 
esac
 
exit 0

Thanks!
Peter
 
 

  _____  

From: Allison Almeida [mailto:[EMAIL PROTECTED] 
Sent: Saturday, June 16, 2007 12:39 AM
To: [EMAIL PROTECTED]
Cc: Davy Chan; Kannel
Subject: Re: Kannel on Ubuntu server


Peter.


Something wrong with this:

1 -  In the kannel.conf that you send in your first email, the "log-file"
directive shows /tmp/kannel.log, don't /var/log/kannel. 
2 - Send us the script that you use to start/stop the kannel. It's will
facilitate so much the debug from your problem.


[]s
Allison Almeida.



2007/6/14, Peter Lum < [EMAIL PROTECTED]>: 

Hi Davy

Yes, I an see the pid in kannel_smsbox.pid 

I checked and the log files should be in /var/log/kannel/
But there are no files...
I create blank text files of access.log, kannel.log etc and change ownership
to kannel,
Also chmod to 0666 but still there are the log entries in the files. I do 
not what is wrong as there are no logs at all.....

Help!!

**>
**>Hi Allison
**>
**>I created the folders /var/run/kannel and there is no errors.
**>When I start kannel, these are the output **> **>Stopping WAP gateway: 
smsbox wapbox bearerbox.
**>Starting WAP gateway: bearerbox wapbox smsbox.
**>
**>Does the info above tells me that the SMS gateway is also started too,
**>(smsbox)?

  ps uw `sudo cat /var/run/kannel/kannel_smsbox.pid` 

If the above command outputs a process description then that means the
smsbox is running.

**>Also, there are no log files in /tmp?

Are you sure your config files specify that the logfiles should be in /tmp? 
Look for "log-file = ..." in the config files. For access logs, look for
"access-log = ..." in the config files.

See ya...

d.c.






Reply via email to