I'll just throw this out here, I'm still researching - I have a service unit that has: Requires=mysql.service I'm trying to override this to "Requires=" (i.e. nothing) with a drop-in, but I'm not having any luck. I keep getting: mythbe2:/etc/systemd/system # systemctl start mythbackend Failed to start mythbackend.service: Unit mysql.service not found. I can override it to something different, but how do I just remove it ? -- Per Jessen, Zürich (1.0°C) Member, openSUSE Heroes (2016 - present) We're hiring - https://en.opensuse.org/openSUSE:Heroes
On Tue, 28 Feb 2023 16:14:09 +0100 Per Jessen <per@jessen.ch> wrote:
I'll just throw this out here, I'm still researching - I have a service unit that has:
Requires=mysql.service
I'm trying to override this to "Requires=" (i.e. nothing) with a drop-in, but I'm not having any luck. I keep getting:
mythbe2:/etc/systemd/system # systemctl start mythbackend Failed to start mythbackend.service: Unit mysql.service not found.
I can override it to something different, but how do I just remove it ?
I believe you have to override the entire unit if you want to remove dependencies :(
Dave Howorth wrote:
On Tue, 28 Feb 2023 16:14:09 +0100 Per Jessen <per@jessen.ch> wrote:
I'll just throw this out here, I'm still researching - I have a service unit that has:
Requires=mysql.service
I'm trying to override this to "Requires=" (i.e. nothing) with a drop-in, but I'm not having any luck. I keep getting:
mythbe2:/etc/systemd/system # systemctl start mythbackend Failed to start mythbackend.service: Unit mysql.service not found.
I can override it to something different, but how do I just remove it ?
I believe you have to override the entire unit if you want to remove dependencies :(
Yeah, I found about about 2 minutes after posting it. Thanks! -- Per Jessen, Zürich (-0.2°C) Member, openSUSE Heroes (2016 - present) We're hiring - https://en.opensuse.org/openSUSE:Heroes
Just for future reference: https://www.freedesktop.org/software/systemd/man/systemd.unit.html "If you want to remove dependencies, you have to override the entire unit." Cheers Georg On 2/28/23 17:00, Per Jessen wrote:
Dave Howorth wrote:
On Tue, 28 Feb 2023 16:14:09 +0100 Per Jessen <per@jessen.ch> wrote:
I'll just throw this out here, I'm still researching - I have a service unit that has:
Requires=mysql.service
I'm trying to override this to "Requires=" (i.e. nothing) with a drop-in, but I'm not having any luck. I keep getting:
mythbe2:/etc/systemd/system # systemctl start mythbackend Failed to start mythbackend.service: Unit mysql.service not found.
I can override it to something different, but how do I just remove it ?
I believe you have to override the entire unit if you want to remove dependencies :(
Yeah, I found about about 2 minutes after posting it. Thanks!
On 2023-02-28 09:14, Per Jessen wrote:
I'll just throw this out here, I'm still researching - I have a service unit that has:
Requires=mysql.service
I'm trying to override this to "Requires=" (i.e. nothing) with a drop-in, but I'm not having any luck. I keep getting:
mythbe2:/etc/systemd/system # systemctl start mythbackend Failed to start mythbackend.service: Unit mysql.service not found.
I can override it to something different, but how do I just remove it ?
How are you editing the .service file? You probably should be using systemctl, eg (as root, of course): systemctl edit mythbackend.service Just remove the line and save (it's using nano as its editor).
Darryl Gregorash wrote:
On 2023-02-28 09:14, Per Jessen wrote:
I'll just throw this out here, I'm still researching - I have a service unit that has:
Requires=mysql.service
I'm trying to override this to "Requires=" (i.e. nothing) with a drop-in, but I'm not having any luck. I keep getting:
mythbe2:/etc/systemd/system # systemctl start mythbackend Failed to start mythbackend.service: Unit mysql.service not found.
I can override it to something different, but how do I just remove it ?
How are you editing the .service file? You probably should be using systemctl, eg (as root, of course):
systemctl edit mythbackend.service
Just remove the line and save (it's using nano as its editor).
At first I tried the usual with a drop-in override, but in the end I edited the whole service unit with: SYSTEMD_EDITOR=vim \ systemctl edit --full mythbackend. -- Per Jessen, Zürich (-0.8°C) Member, openSUSE Heroes (2016 - present) We're hiring - https://en.opensuse.org/openSUSE:Heroes
participants (4)
-
Darryl Gregorash
-
Dave Howorth
-
Georg Pfuetzenreuter
-
Per Jessen