T
T
topuserman2019-11-20 16:09:22
Design
topuserman, 2019-11-20 16:09:22

How to add a service to startup via systemctl enable if the service is a symbolic link?

I have a regular service on `systemd`.
Located here /etc/systemd/system/[email protected]
I need to start this service at system startup.
I do this like this: systemctl enable [email protected]
after which, linux creates some symlinks and everything works as it should.
Now there is a need to move the [email protected] file to another folder so that this file comes under version control along with the entire project.
To do this, I simply moved the [email protected] file to the folder I needed, and [email protected] made a symbolic link to the file that is in my project folder.
Everything continues to work, through systemctl you can control the start, stop of the service, but when you try to add it to autoload, I write systemctl enable [email protected] and in response an error, systemctl swears and says that there are too many symbolic links.

`Failed to execute operation: Too many levels of symbolic links`

Please tell me what to do? What are the solutions?

Answer the question

In order to leave comments, you need to log in

5 answer(s)
A
Alex Goncharov, 2018-11-17
@calirails

Try PT Serif, or find it with WhatTheFont

A
Alexander Dorokhin, 2018-11-17
@Uudya

2 similar
task small caps
kamlien

O
OnYourLips, 2019-11-20
@topuserman

You called me to the topic.

Please tell me what to do? What are the solutions?
The normal option is to deploy units with an ansible or similar system when deploying an application.

P
pfg21, 2019-11-20
@pfg21

quite natural protection "from the fool" - a large nesting of symlinks can break somewhere. and the option is not ruled out that such a thing is cranking out some kind of malware trying to move system files away from system prohibitions.
Put in your project folder a symbolic link to the systemd unit file.

R
rionnagel, 2019-11-21
@rionnagel

ci/cd, crontab. I don’t know, you can try to make a symlink from a hardlink) I’ll try for a PC if it’s possible).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question