OIC on-prem adapter init.d
Content
So we utilize a lot of internal resources. As such I have the on premise connectivity agent for OIC 18.3.5 running on redhat 6.9 box. When that box gets patched and restarted the connectivity agent doesn't restart.
I have the jar file located at /opt/connectivity-agent/connectivityagent.jar. In the same folder I have a start-agent.sh file that has the following bash script
#!/bin/bash
sudo nohup java -jar /opt/connectivity-agent/connectivityagent.jar START &
That starts the agent fine and creates a pid file containing the pid.
I want to #1 make this process into a service and #2 have it automatically start on reboot. in /etc/init.d I created a file called connectivity-agent. it is owned by root. I chmod 777 it. The bash code is as follows