[prev in list] [next in list] [prev in thread] [next in thread]
List: msql
Subject: Re: [mSQL] Auto restart for mSQL on ISP
From: Thomas Drillich <drillich () uniserve ! de>
Date: 1997-07-04 19:18:35
[Download RAW message or body]
Pluto sagt >>
>>
>> > Could anyone please tell me if there is a means (small program, perhaps)
>> > to automatically restart the mSQL server after it is taken down by a
>> > reboot of the ISP server it is running on?
>> >
>> > I have mSQL running fine on my ISP virtual domain, but have permissions
>> > only at my own root - /usr/home/my_domain/ - and not below this, so
>> > anything to restart the mSQL server must live here and not at the main
>> > (Apache) server root.
>> >
rc.file:
#!/bin/sh
nohup /usr/msql/bin/msqlwatch >/var/adm/msql.log 2>&1 &
msqlwatch:
#!/bin/sh
export MSQL_HOME=/usr/msql
PID_FILE=$MSQL_HOME/msql2d.pid
[ ! -f $PID_FILE ] && echo -1 > $PID_FILE # make shure that msql starts
if [ -x $MSQL_HOME/bin/msql2d ]
then
while true
do
ps -ax | grep `cat $PID_FILE` | grep -q msql2d
if [ $? -eq 1 ]; then
$MSQL_HOME/bin/msql2d -f $MSQL_HOME/msql.conf &
echo "Msql restarted `date "+%H:%M %d.%m.%Y"`"
else echo "Msql runs `date "+%H:%M %d.%m.%Y"`"
fi
wait `cat $PID_FILE`
# sleep 10m
done
else echo "Can´t start msql"
fi
--
mit freundlichem Gru"s -- regards
Thomas Drillich <drillich@uniserve.de>
uniserveŽ Internet & Multimedia GmbH;
Sophienweg 3; Technologiezentum (MIT); D-59872 Meschede
fon +49 291 59100; fax +49 291 59102; handy +49 171 8947561
--------------------------------------------------------------------------
To remove yourself from the Mini SQL mailing list send a message containing
"unsubscribe" to msql-list-request@bunyip.com. Send a message containing
"info msql-list" to majordomo@bunyip.com for info on monthly archives of
the list. For more help, mail owner-msql-list@bunyip.com NOT the msql-list!
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic