...
Add a symbolic link to the /etc/init.d directory. For example:
Code Block language bash title Redhat ln -fs /SIFAgents/USAS-SIF-Agent-2.0.2/USAS_daemon.sh /etc/init.d/usas_sif ln -fs /SIFAgents/USPS-SIF-Agent-2.0.2/USPS_daemon.sh /etc/init.d/usps_sif
Ensure that the owner is root. If that is not the case, use the following command to change the owner to root.
Code Block language bash title Redhat chown root:root /etc/init.d/usas_sif chown root:root /etc/init.d/usps_sif
Change the rights using the following command.
Code Block language bash title Redhat chmod 755 /etc/init.d/usas_sif chmod 755 /etc/init.d/usps_sif
Next, use the following command to add the USAS_daemon.sh or USPS_daemon.sh to the list of daemons.
Code Block language bash title Redhat Linux chkconfig --add usas_sif chkconfig --add usps_sif chkconfig --levels 2345 usas_sif on chkconfig --levels 2345 usps_sif on
To start the agent, use this command.
Code Block language bash title Redhat service usas_sif start service usas_sif start
To ask if the agent is running, use this command.
Code Block language bash title Redhat service usas_sif status service usps_sif status
To stop the agent, use this command.
Code Block language bash service usas_sif stop service usps_sif stop
Ubuntu Linux -
...
Daemonize
A service file for the SIF Agent needs to be created and placed in /etc/systemd/system
...