From aca0abc7806f50dbc473b5fa834179e13fadbb9f Mon Sep 17 00:00:00 2001 From: adam Date: Tue, 13 Oct 2026 19:54:57 +0100 Subject: [PATCH] Add the jarld.service alias for jarl.service systemctl restart/status jarld now work too. The package relinks a unit enabled by an older version on upgrade, so the alias appears without re-enabling; make uninstall removes the link. Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 6 ++++++ Makefile | 1 + deploy/debian/postinst | 7 +++++++ deploy/systemd/jarl.service | 2 ++ docs/install.md | 4 ++++ 5 files changed, 20 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 288b382..df1d6db 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,12 @@ All notable changes to Jarl are documented here. The format follows ## [Unreleased] +### Added + +- `jarl.service` has the alias `jarld.service`, so `systemctl restart + jarld` works too. The alias is linked when the unit is enabled; the + package relinks a unit enabled by an older version on upgrade. + ## [0.6.0] - 2026-10-13 ### Added diff --git a/Makefile b/Makefile index 419dbf8..7c7f407 100644 --- a/Makefile +++ b/Makefile @@ -114,6 +114,7 @@ install-files: uninstall: rm -f $(DESTDIR)$(BINDIR)/jarld $(DESTDIR)$(BINDIR)/jarl $(DESTDIR)$(UNITDIR)/jarl.service \ + $(DESTDIR)$(UNITDIR)/jarld.service \ $(DESTDIR)$(UNITDIR)/jarl-backup.service $(DESTDIR)$(UNITDIR)/jarl-backup.timer \ $(DESTDIR)$(BASHCOMPDIR)/jarl $(DESTDIR)$(BASHCOMPDIR)/jarld \ $(DESTDIR)$(SYSUSERSDIR)/jarl.conf $(DESTDIR)$(TMPFILESDIR)/jarl.conf diff --git a/deploy/debian/postinst b/deploy/debian/postinst index 375ef93..3830822 100755 --- a/deploy/debian/postinst +++ b/deploy/debian/postinst @@ -38,6 +38,13 @@ if [ "$1" = configure ]; then if systemctl is-enabled --quiet jarl-backup.timer 2>/dev/null; then systemctl start jarl-backup.timer || true fi + # The jarld.service alias is linked when jarl.service is enabled; + # relink a unit enabled before the alias existed (this neither + # starts nor stops jarld). + if [ -n "$2" ] && systemctl is-enabled --quiet jarl.service 2>/dev/null \ + && [ ! -e /etc/systemd/system/jarld.service ]; then + systemctl reenable jarl.service >/dev/null 2>&1 || true + fi # An upgrade restarts a running jarld (its database is upgraded # when it starts). A first install starts nothing: Jarl needs # 'jarld init' and 'jarld adopt' first. diff --git a/deploy/systemd/jarl.service b/deploy/systemd/jarl.service index ad8fc01..9044f6f 100644 --- a/deploy/systemd/jarl.service +++ b/deploy/systemd/jarl.service @@ -65,3 +65,5 @@ SystemCallErrorNumber=EPERM [Install] WantedBy=multi-user.target +# 'systemctl restart jarld' works too (the daemon's binary is jarld). +Alias=jarld.service diff --git a/docs/install.md b/docs/install.md index e2105f7..f6360ae 100644 --- a/docs/install.md +++ b/docs/install.md @@ -317,6 +317,10 @@ systemctl status jarl journalctl -u jarl -f ``` +The unit also answers to `jarld` (`Alias=jarld.service`), so +`systemctl restart jarld` and `journalctl -u jarl` work alike once it +is enabled. + Open `https://:8053/` and log in as `admin`. ## 9. Set up the CLI