Complete Installation and Upgrade Information for Software AG Products : Installing Software AG Products : Register Daemons to Automatically Start and Shut Down Products on UNIX Systems : Register Daemons for Products that Provide rc-scripts but not daemon.sh : Manually Register a Daemon on an AIX System
Manually Register a Daemon on an AIX System
1. Log on to the system as the root user.
2. In the /etc directory, create an init-script using the naming convention sagrc-script_name (for example, sagis_default99). If you need to create multiple init-scripts because you have multiple product instances on the same machine, use the naming convention sagunique_numberrc-script_name.
3. Add the content below to the init-script.
#!/bin/sh
### BEGIN INIT INFO
# Provides: description
# Required-Start: $network $remote_fs syslog
# Required-Stop:
# Should-Start: cupsd winbind nmb
# Should-Stop:
# Default-Start: 2 3 5
# Default-Stop: 0 1 6
# Description: Start/stop script for Software AG daemons
### END INIT INFO
# @full_path_to_rc-script@ # ID for daemon.sh compatibility.
#
SAGUSER=user_that_installed_products
PATH=/usr/bin":"$PATH
export PATH
USER=`id | cut -d'(' -f2|cut -d')' -f1`
case "${USER}" in
root)
su $SAGUSER -c "/bin/sh -c 'full_path_to_rc-script ${1}'"
;;
${SAGUSER})
full_path_to_rc-script ${1}
;;
*)
echo "[rc-script_name] ABORT: user ${USER} may not call this script"
exit 1
;;
esac
4. Execute this command:
chmod +x /etc/sagoptional_unique_numberrc-script_name
5. Register the daemon by running this command:
/usr/sbin/mkitab "init-script_name:523:wait:/etc/init-script_name
start > /dev/console 2>&1"
Copyright © 2007-2015 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback