Skip to content

feat(systemd): the units answer to recasaos* names too - #26

Merged
inkly merged 1 commit into
ReCasaOS:mainfrom
Vinz2168:feat/recasaos-unit-alias
Nov 6, 2026
Merged

inkly merged 1 commit into
ReCasaOS:mainfrom
Vinz2168:feat/recasaos-unit-alias

Conversation

@Vinz2168

@Vinz2168 Vinz2168 commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Alias=recasaos….service in [Install] of casaos-local-storage-first.service, casaos-local-storage.service, so systemctl status recasaos… and systemctl restart recasaos… work, while everything that uses the casaos* names keeps working. Part of the service names question in ReCasaOS/CasaOS#84. The other units: ReCasaOS/CasaOS#95, ReCasaOS/CasaOS-Gateway#7, ReCasaOS/CasaOS-MessageBus#10, ReCasaOS/CasaOS-UserService#10, ReCasaOS/CasaOS-AppManagement#41.

Existing boxes get the names on their next update, without a reenable step. An alias exists once the unit is enabled. The setup script already runs systemctl enable --force on every install and update, install.sh copies the new unit files before it runs the setup scripts, and the update button runs install.sh too. systemctl enable on a unit that is already enabled adds an Alias= it did not have. I checked this on a Linux Mint 22.2 box (systemd 255) with a test unit, without a daemon-reload in between as well.

Tested on that box (v0.5.84): I put the unit files of the PRs in place and ran the same systemctl enable the setup scripts run. Every recasaos* name resolved to its casaos* unit (systemctl show -p Id) and was active, systemctl restart recasaos-gateway worked, and after a reboot all were active. systemd-analyze verify is clean. systemctl disable, which the uninstaller and the cleanup scripts run, removes the alias symlinks too.

One thing the alias does not do: journalctl -u recasaos finds nothing, because the journal keys on the unit's real name. Logs stay under journalctl -u casaos.

Alias=recasaos*.service in [Install], so `systemctl restart recasaos`
works while everything that uses the casaos* names keeps working.
The setup script already runs `systemctl enable --force` on every
install and update, and enable adds a new Alias to a unit that was
enabled before, so existing boxes get the names on their next update.

@inkly inkly left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I checked the part that matters for existing boxes: the setup scripts run systemctl enable --force on every install and update, so the alias appears without a reenable step, and the uninstaller's systemctl disable removes it again. Thanks!

@inkly
inkly merged commit 078f26b into ReCasaOS:main Nov 6, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants