Systemd Service Configuration
does adding a /lib/systemd/system/{unit}.service all I need in order to add a service?
see example file for Tomcat that I plan to add at https://github.com/wichtounet/systemd-unit-files/blob/master/tomcat.service
are any special permissions required for that file (execute)?
TIA,
Igal
2 thoughts on - Systemd Service Configuration
Yes but for service files that have not been introduced through package management (ie rpm) the proper location is /etc/systemd/system
Note that any files in /etc/systemd will override ones in /usr/lib/systemd
No these are just configuration files rather than scripts that get executed so no special permissions are needed.
After adding or changing a unit file do systemctl daemon-reload for systemd to read in the changes.
You also have to enable the service with “systemctl enable“. “.
And if you want it to start right away, instead of waiting for the next reboot, you have to start it with “systemctl start
Alan Stern