2017-08-22

systemd

contents of the configuration files are grouped sets of variable settings. see the man pages for systemd.service about possible variables to set. the systemd man pages are relatively clear

man systemd
man systemd.service

example

file: /etc/systemd/system/test.service

[Unit]
Description=test

[Service]
ExecStart=/usr/bin/do-something
Type=simple
User=other-user

[Install]
WantedBy=multi-user.target

git-daemon systemd service

[Unit]
Description=git
After=network.target

[Service]
User=git
Group=git
ExecStart=-/usr/lib/git-core/git-daemon --export-all --base-path=/srv/git/public
Type=simple
Restart=on-failure

[Install]
WantedBy=multi-user.target

tags: start document guide example computer linux systemd