Current view: XpoLog V7 (Latest). Available: XpoLog V6 and XpoLog V5

Skip to end of metadata
Go to start of metadata

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:

[Unit]
Description=XpoLog Service
After=network-online.target

[Service]
Type=forking
NotifyAccess=main
User=root
ExecStart=/PATH_TO_XPOLOG_INSTALL_DIR/runXpoLog.sh start
Restart=always

[Install]
WantedBy=multi-user.target

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):

#!/bin/sh
DIR=`dirname $0`

nohup sh $DIR/runXpoLog.sh stop

  • No labels