diff options
-rw-r--r-- | content/blog/2024-08-18-user-services-with-systemd.md | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/content/blog/2024-08-18-user-services-with-systemd.md b/content/blog/2024-08-18-user-services-with-systemd.md index 0486919..83d8bb1 100644 --- a/content/blog/2024-08-18-user-services-with-systemd.md +++ b/content/blog/2024-08-18-user-services-with-systemd.md @@ -11,7 +11,7 @@ Recently, I've started using `systemd` order to manage personal services on my s Before that, I had either set up system-wide unit files or, for more ad-hoc services, started the process inside of a `screen` session, then detaching, hoping the process didn't crash overnight. -Using `systemd` instead is way better, since you get stuff like `journalctl` to view logs and `RestartAlways` keep things running. Also, all configuration lives in `$HOME` making it easy to edit and back up. +Using `systemd` instead is way better, since you get stuff like `journalctl` to view logs and `RestartAlways` keep things running after random crashes. Plus, all configuration lives in `$HOME` making it easy to edit and back up. In this post, I will show you how to set this up on any modern Debian-based system (or any distro that uses `systemd`, really). @@ -64,6 +64,11 @@ ExecStart=racket hello-world-server.rkt WantedBy=default.target ``` +## Reload unit files +Just like system-wide `systemd`, if you edit or create new unit files for your user, you'll need to reload your copy of `systemd` by running `systemctl daemon-reload`, like so: + + $ systemctl --user daemon-reload + ### Start service on boot This starts `example` as soon as your copy `systemd` is launched (which should be at boot, since we enabled lingering): |