I 've custom systemd service file. Which is the recommended directory?
What is the difference between them?
/etc/systemd/system/
/etc/systemd/system/multi-user.target.wants
Put it in /etc/systemd/system/
.
If you have:
[Install]
WantedBy=multi-user.target
Then a link will be placed in /etc/systemd/system/multi-user.target.wants
when you:
# systemctl enable myservice.service
Created symlink /etc/systemd/system/multi-user.target.wants/myservice.service → /etc/systemd/system/myservice.service.
systemd only uses the links in multi-user.target.wants/
to know which units to raise when multi-user.target
is raised.