Um script que acabei de escrever para inicialização automatica, abraço a todos
#! /bin/sh
# Copyright (c) 1995-2013 ajm Solutions, Brazil.
#
# Author: Amilcar de Jesus Moreti <amilcar@ajmsolutions.com.br>
#
# /etc/init.d/informix
#
# and symbolic its link
#
# /usr/sbin/rcifx
#
### BEGIN INIT INFO
# Provides: informix
# Required-Start: cron
# Required-Stop:
# Default-Start: 2 3 5
# Default-Stop: 0 1 6
# Short-Description: Startup Informix
# Description: Startup Informix Dynamic Server
### END INIT INFO
. /etc/rc.status
export CONFIG="/etc/ifx.conf"
if [ ! -f $CONFIG ] ; then
echo "file: $CONFIG not found"
exit 6
fi
test -x $CONFIG || exit 5
. $CONFIG
export onInit="$INFORMIXDIR/bin/oninit"
export onMode="$INFORMIXDIR/bin/onmode"
serverInst="tst prj"
test -x $onInit || exit 5
rc_reset
case "$1" in
start)
echo "Initializing Informix Dynamic Server"
for ifxServer in ${serverInst}
do
INFORMIXSERVER=$ifxServer
ONCONFIG=onconfig.$ifxServer
export INFORMIXSERVER ONCONFIG
echo "Initializing Instance $ifxServer"
su informix -c "$onInit" >/dev/null 2>&1
rc_status -v
done
;;
stop)
echo -n "Stoping Informix Dynamic Server"
for ifxServer in ${serverInst}
do
INFORMIXSERVER=$ifxServer
ONCONFIG=onconfig.$ifxServer
export INFORMIXSERVER ONCONFIG
echo "Stoping Instance $ifxServer"
su informix -c "$onMode -ky" >/dev/null 2>&1
rc_status -v
done
;;
*)
echo "Usage: $0 {start|stop}"
exit 1
;;
esac
rc_exit