diff options
author | Julio Capote <6135+capotej@users.noreply.github.com> | 2024-08-19 02:21:37 +0000 |
---|---|---|
committer | Julio Capote <6135+capotej@users.noreply.github.com> | 2024-08-19 02:21:37 +0000 |
commit | f61e4bf5692683039db019515159d598020cf1a8 (patch) | |
tree | 8c2f66c2e09aab9fa26292b6e90504a29332f3df /content/blog/2024-08-18-user-services-with-systemd.md | |
parent | 9555acc417a668e791aa5758b0863d08786c28ce (diff) | |
download | capotej.com-f61e4bf5692683039db019515159d598020cf1a8.tar.gz |
blog post
Diffstat (limited to '')
-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): |