How to setup ssg as a service for automatic startup on a software install

Document ID : KB000121371
Last Modified Date : 20/11/2018
Show Technical Document Details
Introduction:
This kb article is for the purpose of providing a means to automate Gateway service startup at boot time for the software install version of API Gateway.
The script attached will check user operation, service status, and pid status.
The script will not check anything related to iptables or firewall rules.
 
Environment:
Any Software install version of the API Gateway.
Instructions:
NOTE:
Support and Development cannot guarantee the end result will work for any Software installation of Gateway due to customization and path differences from one install to another. The script and instructions are provided as is without support as this is considered a purely OS level operation.

Implementation and testing instructions:
1. Stop the gateway

2. Copy the ssg file (attached below, remove the .txt extension) to /etc/rc.d/init.d/

3. Ensure the path "/opt/SecureSpan/JDK" exists. A symbolic link will be needed.

#  ln -s <java install folder> /opt/SecureSpan/JDK

Normally the path /usr/bin/java is a link to <java install path>/bin/java, not the path where the java is installed.
For example:
# ll /usr/bin/java
lrwxrwxrwx. 1 root root 22 Oct 22 2018 /usr/bin/java -> /etc/alternatives/java
# ll /etc/alternatives/java
lrwxrwxrwx. 1 root root 46 Oct 22 2018 /etc/alternatives/java -> /usr/lib/jvm/jre-version_build-openjdk.x86_64/bin/java

The parent path of /bin/java is the path you will need.

4. test the following:
service ssg status
service ssg start
service ssg stop

5. to startup ssg on reboot:
chkconfig --add ssg
chkconfig ssg on

Support cannot guarantee the same paths are set for all users who use the software version of the Gateway so care will have to be taken in making sure all directives match. Please review the script carefully.
File Attachments:
ssg.txt