Re: Shutdown script for linux
Posted in 1999
Topics: Server Administration, Platform-Specific Issues
Zeljan
You haven't actually provided the rc mechanism with a way of shutting
informix down. After the start part of the case statement, put
stop)
su informix -c "onmode -ky"
echo "Informix is down"
;;
That should sort it out.
Davin
Zeljan Silje <zeljan@laus.hr> on 26/10/99 10:43:46
To: informix-list@iiug.org
cc: (bcc: Davin Harvey/TSY/StanChart)
Subject: Shutdown script for linux
Category:
Hi,
I am using ids-7.30.UC5-1 on Linux RedHat5.2. I would like to bring
informix online when machine is started, and take informix offline when
machine is shut downed.
I create script inf in /etc/rc.d/init.d directory:
#!/bin/sh
INFORMIXDIR=/opt/informix ; export INFORMIXDIR
PATH=/bin:/etc:$INFORMIXDIR/bin ; export PATH
case "$1" in
start)
su -c "oninit" informix
echo "Pokrecem INFORMIX."
if test $? = "0"
then
echo "INFORMIX uspjesno pokrenut!"
else
echo "INFORMIX NIJE uspjesno pokrenut!"
fi
;;
*)
echo "Usage: $0 { start | stop }" >&2
;;
esac
exit 0
I also created symbolic links in following directories:
./rc0.d/K95inf
./rc1.d/K95inf
./rc2.d/S95inf
./rc3.d/S95inf
./rc5.d/S95inf
./rc6.d/K95inf
I can automatic bring informix online with such configuration, but I
cannot take informix offline when I shut down machine (via shutdown 0).
Any ideas?
+--------------------------+-----------------------------+
| Zeljan Silje | e-mail: zeljan@laus.hr |
| CC Computer Consulting | |
| Put Republike 7 | Tel: +385 (20) 356-877 |
| 20 000 Dubrovnik | Fax: +385 (20) 356-877 |
| Hrvatska (Croatia) | URL: http://www.laus.hr |
+--------------------------+-----------------------------+
********************************************************************
Any opinions, express or implied, presented are solely those
of the author and do not necessarily represent those of
Standard Chartered Group
********************************************************************
In article <7v4err$7f2$1@news.xmission.com>, Davin.Harvey <Davin.Harvey@
uk.standardchartered.com> writes
>
>
>
>
>Zeljan
>
>You haven't actually provided the rc mechanism with a way of shutting
>informix down. After the start part of the case statement, put
>
>stop)
> su informix -c "onmode -ky"
onmode -yuk, the u is needed.
> echo "Informix is down"
> ;;
>
>That should sort it out.
>
>Davin
>
>
>
>
>
>Zeljan Silje <zeljan@laus.hr> on 26/10/99 10:43:46
>
>To: informix-list@iiug.org
>cc: (bcc: Davin Harvey/TSY/StanChart)
>Subject: Shutdown script for linux
>Category:
>
>Hi,
>
>I am using ids-7.30.UC5-1 on Linux RedHat5.2. I would like to bring
>informix online when machine is started, and take informix offline when
>machine is shut downed.
>I create script inf in /etc/rc.d/init.d directory:
>#!/bin/sh
>
>INFORMIXDIR=/opt/informix ; export INFORMIXDIR
>PATH=/bin:/etc:$INFORMIXDIR/bin ; export PATH>
>case "$1" in
>start)
> su -c "oninit" informix
> echo "Pokrecem INFORMIX."
> if test $? = "0"
> then
> echo "INFORMIX uspjesno pokrenut!"
> else
> echo "INFORMIX NIJE uspjesno pokrenut!"
> fi
>;;
>*)
> echo "Usage: $0 { start | stop }" >&2
>;;
>esac
>exit 0
>
>I also created symbolic links in following directories:
>./rc0.d/K95inf
>./rc1.d/K95inf
>./rc2.d/S95inf
>./rc3.d/S95inf
>./rc5.d/S95inf
>./rc6.d/K95inf
>
>I can automatic bring informix online with such configuration, but I
>cannot take informix offline when I shut down machine (via shutdown 0).
>
>Any ideas?
>
>+--------------------------+-----------------------------+
>| Zeljan Silje | e-mail: zeljan@laus.hr |
>| CC Computer Consulting | |
>| Put Republike 7 | Tel: +385 (20) 356-877 |
>| 20 000 Dubrovnik | Fax: +385 (20) 356-877 |
>| Hrvatska (Croatia) | URL: http://www.laus.hr |
>+--------------------------+-----------------------------+
>
>
>
>********************************************************************
>Any opinions, express or implied, presented are solely those
>of the author and do not necessarily represent those of
>Standard Chartered Group
>********************************************************************
>
>
--
David Williams
David Williams wrote:
>
> In article <7v4err$7f2$1@news.xmission.com>, Davin.Harvey <Davin.Harvey@
> uk.standardchartered.com> writes
> >
> >You haven't actually provided the rc mechanism with a way of shutting
> >informix down. After the start part of the case statement, put
> >
> >stop)
> > su informix -c "onmode -ky"
> onmode -yuk, the u is needed.
Isn't, though it lets apps exit more gently. I personally use onmode -uy;
sleep 10; onmode -ky
Art S. Kagel