December 2018
Beginner
826 pages
22h 54m
English
All we've done here is create a local unit file for systemd to read and load.
In order to understand our path choice, try running the following on your system, and see what's returned:
$ systemctl --no-pager show --property=UnitPath
One of the options should be /usr/local/lib/systemd/system, which doesn't exist at first, but does when we create it.
It's a good idea to use a path like this because, not only is there a good chance it's empty, meaning you can logically separate your unit files from others, it's also uncluttered (unlike the /etc/systemd/system/ directory).
We then placed a small example unit file in this directory, featuring the bare minimum to make a functioning service file.
Once written, it's a simple case ...