The AdminServer can be autostarted using an
init.d script. The following is provided 'as-is'. Any issues will need to be further explored through Linux Administrator intervention.
- Below is an example script file "admsrv" and assuming run level 5. If using a different run level, substitute rc5.d for rcx.d and chkconfig 5 93 3 for chkconfig x 93 3.
- In order to find out the proper runlevel and location to place the start-up script in a specific OS please consult with the OS manufacturer. It been noticed the runlevels' function can change between Linux Versions as well as between Linux Releases. Be sure to check the Manufacturers documentation to insure the correct runlevel is being used.
- Place the admsrv script in the /etc/init.d folder.
- Mark the admserv script as executable with chmod: $ chmod +x /etc/init.d/admserv
- Add the admserv script as a service using the Service Configuration tool or chkconfig or by manually creating a link /etc/rc/rc5.d.
NOTE: The name of the symbolic link influences the order the service is started.
EXAMPLE: ln -s /etc/init.d/admsrvc /etc/rc5.d/S99admsrvc
The above command will name the Script S99admsrvc and this will start after scripts which begin S01xxx. It may be advisable to have a higher starting number to make sure other dependencies for the OS are available.
- The script must also create a lock file in the directory /var/lock/subsys/ with a successful start and remove it on a successful stop of the app/Service.
#!/bin/bash
#
# admsrv script
# chkconfig: 5 93 3
# description: Starts and Stops Progress OpenEdge AdminServer and Fathom (if in use)
# FnStatus: shows status in the Service Manager
# Status function
FnStatus()
{
/usr/dlc/bin/proadsv -query
}
# Start function
FnStart()
{
logger Starting Progress OpenEdge:
/usr/dlc/bin/proadsv -start
/usr/dlc/bin/fathom -start
### Create lock files for app/Service ###
touch /var/lock/subsys/OpenEdge
touch /var/lock/subsys/Fathom
}
# Stop function
FnStop()
{
logger -Stopping Progress OpenEdge:
/usr/dlc/bin/fathom -stop
/usr/dlc/bin/proadsv -stop
### Remove lock files for app/Service ###
rm -f /var/lock/subsys/Fathom
rm -f /var/lock/subsys/OpenEdge
}
### main logic ###
case "$1" in
start)
FnStart
FnStatus
;;
stop)
FnStop
;;
status)
FnStatus
;;
restart|reload|condrestart)
FnStop
FnStart
;;
*)
echo $1 "is not a valid parameter"
echo "Syntax: $0 {start|stop|restart|reload|condrestart}"
exit 1
esac
exit 0