Another utility which is common for automation of services in linux is the systemctl.
Systemctl allows users and linux administrators fully control and automatons of linux services, deals with machine restarts and responses of the service after unexpected crashes.
In order to create XpoLog service via this utility, please follow:
1) install and run XpoLog as root user
2) vi /etc/systemd/system/xpolog.service
3) Set the xpolog.service file contents to:
4) Grant execution permission to the service file - chmod +x /etc/systemd/system/xpolog.service
5) Update the OS regarding the new service - systemctl enable xpolog
6) systemctl daemon-reload
- Kill XpoLog (it will automatically start)
- From this point on:
systemctl start xpolog
systemctl stop xpolog
- Change /PATH_TO_XPOLOG_INSTALL_DIR/restart.sh (In order to deal with the daily recycle of XpoLog):
nohup sh $DIR/runXpoLog.sh stop