[prev in list] [next in list] [prev in thread] [next in thread] 

List:       sapdb-general
Subject:    Re: Automatic start on Linux
From:       Jean-Michel OLTRA <jm.oltra.antispam () espinasse ! net>
Date:       2004-08-26 7:16:13
Message-ID: 20040826071613.GB13060 () espinasse
[Download RAW message or body]


    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/maxdb?unsub=sapdb-general@progressive-comp.com

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic