19.7 Overriding Vendor Units with systemctl edit and Drop-Ins
Right, so you’ve installed some package—let’s say nginx—and its maintainers have kindly provided a systemd service unit for you. It’s fine. It works. But it’s not yours. Maybe you want to add an environment variable, tweak a restart policy, or run it as a different user. Your first instinct might be to just copy /usr/lib/systemd/system/nginx.service to /etc/systemd/system/ and go to town. Don’t. That’s how you create a maintenance nightmare. The next time the nginx package updates, your custom version is now a time bomb, completely oblivious to any security or functionality changes the vendor might have made. You’ll be left with a service file that’s both outdated and out of sync.