June 2017
Intermediate to advanced
478 pages
13h 14m
English
A service is a daemon that can be started and stopped, equivalent to a System V init service. A service is a type of unit file with a name ending in .service, for example, lighttpd.service.
A service unit has a [Service] section that describes how it should be run. Here is the relevant section from lighttpd.service:
[Service] ExecStart=/usr/sbin/lighttpd -f /etc/lighttpd/lighttpd.conf -D ExecReload=/bin/kill -HUP $MAINPID
These are the commands to run when starting the service and restarting it. There are many more configuration points you can add in here, so refer to the manual page for systemd.service(5).
Read now
Unlock full access