Answer the question
In order to leave comments, you need to log in
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`
Answer the question
In order to leave comments, you need to log in
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.
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.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question