December 2018
Beginner
826 pages
22h 54m
English
We're going to use sshd.service as an example here, not just because it's a service file you might see a lot, but because it has a good mixture of default entries.
cat our chosen service:
$ systemctl cat sshd.service# /usr/lib/systemd/system/sshd.service[Unit]Description=OpenSSH server daemonDocumentation=man:sshd(8) man:sshd_config(5)After=network.target sshd-keygen.serviceWants=sshd-keygen.service[Service]Type=notifyEnvironmentFile=/etc/sysconfig/sshdExecStart=/usr/sbin/sshd -D $OPTIONSExecReload=/bin/kill -HUP $MAINPIDKillMode=processRestart=on-failureRestartSec=42s[Install]WantedBy=multi-user.target
To understand this file, we have to break it down into its component parts.
Sort of the Main section of the unit file,
Read now
Unlock full access