Am Dienstag, 15. Oktober 2002 16:00 schrieb Lars-Hendrik Schneider:

Hi Joerg,

here is the bootscript I wrote, perhaps this will help you:

> > Are there some scripts available to start kannel wapbox or smsbox after
> > reboot automatically ? I use RedHat 7.3
> >
> > If not can someone give me some ideas how to do this ?
> >
> > Thanks in advance
> >
> > Joerg


*********************************
I used the CVS short time before 1.2.0 stable was released - so just remember 
to change the paths to the corect paths on your machine! In this example 
bearerbox, smsbox and wapbox are stored in: /usr/local/sbin
My conffiles are stored in:  /var/www/html/conf - so I can upload them via 
ftp.
I didn't change it here - so just remember do do so!

1. making of the bootscript:
# cd /usr/local/sbin
# vi startkannel
*************************
#!/bin/csh
echo -n "now bearerbox is started..."
/usr/local/sbin/bearerbox -v 1 /var/www/html/conf/kannel.conf >>& 
/var/www/html/logs/bearerbox.log
echo "done."
sleep 15
echo -n "now smsbox is started..."
/usr/local/sbin/smsbox -v 1 /var/www/html/conf/kannel.conf >>& 
/var/www/html/logs/smsbox.log
echo "done."
*************************
:w, :x
# chmod a+x startkannel

---> What has happened here? We created a textfile which will write on the 
bootscreen "now...." when it starts the bearerbox and "done." when it is 
ready. Then the system waits for 15 seconds (or any time you need for opening 
the modem) and starts then the smsbox. By the way it creates a logfile for 
each *box in /var/www/html/logs/*.log. After writing it we made the file 
executable with chmod a+x.

2. Now we have to tell the system that it has to run this script at boottime:

# cd /etc
# vi rc.local
****************************************
[go to the end of rc.local and enter]


# run the startscript of kannel <- description ;)
/usr/local/sbin/startkannel
**************************************
:w, :x

---> What has happened here? The different rc* are often just symbolic links. 
On my Mandrake system (I use the 8.2) the rc.local is the file to store your 
own bootscripts in. So I just inserted the path to my startkannel - script 
and it's started everytime the computer is started.
Due to the fact that Mandrake is RedHat-based, I think you will find 
everything in the same place (but I think the path to bearerbox [...] has 
changed in 1.2.0.

I hope this helps you - let me know!

greetz 
Lars-Hendrik


****************************************
Lars-Hendrik Schneider
[EMAIL PROTECTED]
http://www.trinityvision.de 
Partner von RUNetwork @ www.runetwork.de

Reply via email to