Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Create the /etc/init.d/alti_start file. In this script, it is a script that actually starts up the DBMS by using the Altibase startup command.

 

#!/sbin/sh
if [ -f /etc/alti-conf.d/alti.conf ] ; then
. /etc/alti-conf.d/alti.conf
Fi 

Wiki Markup
{*}ADMIN="${ALTIBASE_HOME}/bin/isql \-s 127.0.0.1 \-u sys \-p manager \-sysdba"*

 
 

Wiki Markup
*${ADMIN} <<EOF{*}

 
startup
quit
EOF

STEP3 

Create the /etc/init.d/alti_stop file.
In this script, it is a script that actually stops the DBMS by using the Altibase command.

 

#!/sbin/sh
if [ -f /etc/alti-conf.d/alti.conf ] ; then
. /etc/alti-conf.d/alti.conf
fi
 

Wiki Markup
ADMIN="${ALTIBASE_HOME}/bin/isql \-s 127.0.0.1 \-u sys \-p manager \-sysdba"
Wiki Markup
*${ADMIN} <<EOF{*}

 
shutdown immediate
quit
EOF

 STEP4STEP4

Create the /etc/init.d/altibase file.

This file is actually the file that the startup script or stop script will create a symbolic link later on. The contents of this file are as follows.

#!/sbin/sh
#
# Copyright (c) 1997, 2001 by Sun Microsystems, Inc.
# All rights reserved.
#
#ident "@(#)altibase 1.0 04/08/17"
case $1 in
'start')
# source the system configuration variables
if [ -f /etc/alti-conf.d/alti.conf ] ; then
. /etc/alti-conf.d/alti.conf
else
echo "ERROR: /etc/alti-conf.d/alti.conf defaults file MISSING"
fi
# Check to see if this script is allowed to run...
if [ "$START_ALTIBASE" != 1 ]; then
exit 2
else
# Execute the commands to start your subsystem
su - $ALTIBASE_OWNER -c "/etc/init.d/alti_start"
fi
;;
'stop')
# source the system configuration variables
if [ -f /etc/alti-conf.d/alti.conf ] ; then
. /etc/alti-conf.d/alti.conf
else
echo "ERROR: /etc/alti-conf.d/alti.conf defaults file MISSING"
fi
# Check to see if this script is allowed to run...
if [ "$START_ALTIBASE" != 1 ]; then
exit 2
else
su - $ALTIBASE_OWNER -c "/etc/init.d/alti_stop"
# Execute the commands to stop your subsystem
fi
;;
*)
 

Wiki Markup
{*}echo "usage: $0 {start\|stop}"*

 
exit 1
;;
esac
exit 0 


STEP5

Create a Hard Link of Startup Script and Shutdown Script in /etc/rc3.d Directory.

 

#cd /etc/rc3.d
# ln /etc/init.d/altibase S955altibase

STEP6

Set the execution authority so that each script can be executed normally.

#cd /etc/rc3.d
# chmod 755 S955altibase
#cd /etc/init.d
# chmod 755 *alti*

STEP7

Test to see if it operates normally. At this time, the test should be performed under the root account.
 

# /etc/init.d/altibase <start:stop>