Skip to Content
Linux Administration Cookbook
book

Linux Administration Cookbook

by Adam K. Dean
December 2018
Beginner
826 pages
22h 54m
English
Packt Publishing
Content preview from Linux Administration Cookbook

How it works...

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

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Practical Linux Security Cookbook - Second Edition

Practical Linux Security Cookbook - Second Edition

Tajinder Kalsi
Mastering Linux Administration

Mastering Linux Administration

Alexandru Calcatinge, Julian Balog

Publisher Resources

ISBN: 9781789342529Supplemental Content