Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I have no idea what you mean by that. A systemd target is a folder in /etc/systemd/system/ which contains a bunch of symlinks to unit config files. When the target is requested, systemd makes sure that all these units are running. This is how symlinks have been used for configurations since forever (for example by apache on Debian).


ln -s /path/to/mydaemon.service /etc/systemd/system/

systemctl daemon-reload

systemctl disable mydaemon.service

ls /etc/systemd/system/mydaemon.service

ls: cannot access '/etc/systemd/system/mydaemon.service': No such file or directory

It has no business removing that symlink. It was placed there by me, and it should be treated no differently than if it was a regular file.

I have no problem with systemctl enable/disable creating and removing links in the appropriate target.d directories, but this symlink had nothing to do with that mechanism. Leave my stuff alone.


This doesn't work because unit files have to be in one of the load paths. Have you tried adding /path/to/ to $SYSTEMD_UNIT_PATH? This is documented in the Unit File Load Path section of the manpage [1].

[1] https://www.freedesktop.org/software/systemd/man/systemd.uni...


> This doesn't work because ...

> This is how symlinks have been used for configurations since forever (for example by apache on Debian).

This is not how symlinks have been used for configuration "since forever." You didn't have to add the link target to some "load path" variable when the link itself was in the correct directory.


I have a suspicion that you are not really interested in using the software which makes this discussion entirely pointless.

P.S. Debian's a2ensite and a2dissite also assume that your configs are in the sites-available folder, not elsewhere in the file system.


a2dissite doesn't delete symlinks outside sites-enabled, right?

I think it's a reasonable complaint.


It's best not to engage with concern trolls.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: