====== 'systemd' ======
===== Creating a service handled by 'systemd' =====
:!: This is only a sort of reminder on how to install //Epeios// related daemons on a //Debian// system. It's not a comprehensive documentation about //sytemd//.
==== Unit file ====
To create a service for //systemd//, you have to create a ''.service'' suffixed file in ''/etc/systemd/system/'' which looks like:
[Unit]
Description=
After=network.target
[Service]
ExecStart=
Restart=on-failure
[Install]
WantedBy=multi-user.target
where '''' is a string describing the service, and '''' the command with its arguments to launch the daemon.
Example:
[Unit]
Description=Demonstration of the XDHTML technology as web application
After=network.target
[Service]
ExecStart=/home/csimon/services/dmnzq /home/csimon/services/dmnzq.xprj
Restart=on-failure
[Install]
WantedBy=multi-user.target
==== Registering ====
In order to the service to start at boot, you must somehow registering it with following command:
''systemctl enable /etc/systemd/system%%/%%////.service''
where ''////'' is the service name.
Example:
''systemctl enable /etc/systemd/system/xdhdq.service''
:!: This does __not__ start the service ; see below for this.
==== Starting/stopping ====
To start a service, use following command:
''systemctl start ////''
where ''////'' is the service name.
Example:
''systemctl start xdhdq''
To stop, type ''stop'' instead of ''start''.
It works also with the //System V// ''service'' command instead of ''systemctl''.
==== Unregistering ====
In order to remove the service from the boot sequence, you must somehow unregistering it with following command:
''systemctl disable /etc/systemd/system%%/%%////.service''
where ''////'' is the service name.
Example:
''systemctl disable /etc/systemd/system/xdhdq.service''
:!: This does __not__ stop the service ; see above for this.