Table of Contents

'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=<description>
After=network.target
 
[Service]
ExecStart=<command>
Restart=on-failure
 
[Install]
WantedBy=multi-user.target

where <description> is a string describing the service, and <command> the command with its arguments to launch the daemon.

Example:

xdhdq.service
[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>.service

where <service> 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 <service>

where <service> 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>.service

where <service> is the service name.

Example:

systemctl disable /etc/systemd/system/xdhdq.service

:!: This does not stop the service ; see above for this.