When I was adding this script I figured out there was already a 
/etc/init.d/maxdb-server
script that does everything, the only requirement is to add the following line in the 
/etc/default/maxdb-server file:
DATABASES="database1 database2 etc"
The first script sources the 2nd and start/stop the declared database instances.
 

Jean-Michel OLTRA <[EMAIL PROTECTED]> wrote:

bonjour,


Le mercredi 25 ao�t 2004, Karl Strasse a �crit...


> Is there any command, program that I can call from a rc.d script to stop/start a 
> databas
> e instance on reboot in the Linux OS? 



#!/bin/sh
#
# /etc/init.d/maxdb
#
# Lancement maxdb au boot
#
# JM Oltra
#
# $Date: 2004/06/13 20:15:48 $
#
# $Id: sapdb,v 1.2 2004/06/13 20:15:48 jm Exp $
#
#

mode=$1
bindir="/usr/local/sapdb/indep_prog/bin"


case "$mode" in
'stop')
echo -e "\nArr�t de la base CONTACTS"
$bindir/dbmcli -d CONTACTS -u xxx,xxxxxx db_offline
echo -e "\nArr�t du serveur MaxDB........."
$bindir/x_server stop
;;

'start')
echo -e "\nD�marrage du serveur MaxDB......"
$bindir/x_server -Y start
echo -e "\nD�marrage de la base CONTACTS..."
$bindir/dbmcli -d CONTACTS -u xxx,xxxxxxxx db_online
;;

*)
echo -e "usage $0: start|stop\n"
exit 1
;;
esac

I use sth simple like that. Then add the desired links in rcX.d (SXX and
KXX links).
man update-rc.d if Debian user.

-- 
jm


-- 
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]


                
---------------------------------
Do you Yahoo!?
Win 1 of 4,000 free domain names from Yahoo! Enter now.

Reply via email to