You are not logged in.

#1 Today 04:05:04

Beemo
Member
Registered: 2024-12-20
Posts: 184

Changing a systemd unit name

In a package upgrade, I want to change a systemd service unit name.
Current I tried using a symlink with the old name to the new service (so that users relying on the old name don't break). However, if a user have previously run `systemctl enable old@test.service` it indeed still starts at boot, but now both `systemctl status old@test` or `systemctl status new@test` report the unit is `disabled`.

What's the right way to automatically migrate in this case?

Last edited by Beemo (Today 04:06:24)

Offline

#2 Today 05:15:34

Beemo
Member
Registered: 2024-12-20
Posts: 184

Re: Changing a systemd unit name

Related: How to migrate a folder's permission?
I changed the install permission to 700 but during upgrade it warns:

warning: directory permissions differ on /etc/path-to-folder/
filesystem: 755  package: 700

Or is manual intervention the only way for these changes?

Last edited by Beemo (Today 05:16:21)

Offline

#3 Today 06:34:06

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,093

Re: Changing a systemd unit name

You can use a https://wiki.archlinux.org/title/PKGBUILD#install script to update files on the target system w/ eg. post_upgrade - either manually or using systemctl

Offline

Board footer

Powered by FluxBB