Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • 1
    It's worth noting that by itself, adding the WantedBy= as suggested won't get the other service to start with systemctl start main.service. It's not until the main.service is enabled that happens. See the associated docs for WantedBy= here... Commented Nov 20, 2017 at 19:44
  • Sorry, forgot the link: man7.org/linux/man-pages/man5/systemd.unit.5.html Also note that still doesn't seem to work for my test despite creating a symlink. Using "Wants=" instead in the Unit section works the best but requires a potentially unwanted reference from main.service back to the dependent service. Commented Nov 20, 2017 at 19:54
  • Thank you for this ! It works fine. Commented May 8, 2020 at 13:48