Systemd service files in non-default directory
Solution 1:
Actually the real service files are in /lib/systemd/system
. Symlinks to them are created in /etc/systemd/system
when the services are enabled.
If you want to put your service files somewhere else, go ahead, but when you want to enable the service, you must specify the full path to the real service file so that systemd can make the symlink to /etc/systemd/system
, eg:
sudo systemctl enable /path/to/my-service-file