Start cognos on startup linux server

If you have cognos installed on an linux server it is nice to start cognos bi automatic when the server starts. To achieve this you have to add a script to the folder /etc/init.d

After that you have to perform some commands to add cognos to the startup proces of the linux server.

The following script is used to start cognos 8 on a Oracle Linux installation [Enterprise Linux release 4 (October Update 5)]:

#!/bin/bash
#
# Description: Cognos services auto start-stop script.
# Save script in: /etc/init.d as "cognos"
# Perform next steps to make it autostart on powerup:
# – chmod a+x cognos
# – chkconfig –add cognos
# – chkconfig cognos on
#
JAVA_HOME=/opt/IBMJava2-142/jre
COGNOS_OWNER=root
RETVAL=0
prog="Cognos Services"
start() {
echo -n $"Starting $prog: "
# Start the Cognos services
su – $COGNOS_OWNER -c "/opt/cognos/c8/bin/cogconfig.sh -s"
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/cognos
return $RETVAL
}
stop() {
echo -n $"Stopping $prog: "
# Stop the Cognos services
su – $COGNOS_OWNER -c "/opt/cognos/c8/bin/cogconfig.sh -stop"
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -r /var/lock/subsys/cognos
return $RETVAL
}
case "$1″ in
start)
start
;;
stop)
stop
;;
restart)
stop
start
;;
*)
echo $"Usage: $0 {start|stop|restart}"
exit 1
esac


Popular posts from this blog

Shrink you container size up to 95%.

alma linux: dnf Module yaml error: Unexpected key in data