Changing a Packaged Unit Safely
You need to add an environment variable to nginx.service, which comes from a package. What is the right way?
nginx.service
Choose one answer
Edit /usr/lib/systemd/system/nginx.service directly.
/usr/lib/systemd/system/nginx.service
Copy the unit to /tmp and start it from there.
/tmp
Add the variable to /etc/profile, which systemd services read.
/etc/profile
Create a drop-in with systemctl edit nginx, then restart the service.
systemctl edit nginx