Quantcast
Channel: User Zoredache - Unix & Linux Stack Exchange
Viewing all articles
Browse latest Browse all 41

Answer by Zoredache for systemd: how can I run a script on start of a service, without editing the service definition

$
0
0

If you use systemd edit servicename.service you can apply local overrirdes to things in the unit. For your request you might want to adjust these values.

[Service]ExecStartPre=beforestuffExecStopPost=afterstuff

If you override using the edit command the changes will probably get saved to /etc/systemd/system/servicename.service.d/override.conf.

Links:


Viewing all articles
Browse latest Browse all 41

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>