0

I have upgraded several servers from Ubuntu 14.04 to 18.04 with no issue. However, on a fresh Ubuntu 18.04 install, I have encountered a problem that seems strange.

I have edited the systemd service file located at /etc/systemd/system/multi-user.target.wants/tomcat9.service but my changes made no difference, systemctl wouldn't even ask me to reload the daemon.

I even tried to delete the file which did not prevent me from restarting the tomcat service.

After searching for a while, I discovered that there was another service file located in /lib/systemd/system/tomcat9.service and after making the required changes (adding a ReadWritePaths entry), my application was working again.

I found out that systemd scans different directories looking for service files but it seems that /etc/systemd/system should have priority.

How come servers upgraded from Ubuntu 14.04 to 18.04 read the file from /etc/systemd/system but not fresh installs? Is there a place where this behaviour is configured?

Thanks!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.