0
votes

I am looking for an option to run two different type of execstop command in same systemctl service, first stop command will take thread dump then stop the service , second will just stop the service. I would like to control this on runtime when I run systemctl stop servicename

How can I setup pass the variable so I can run either one

ExecStop=/path-to-script/thread-dump.sh && /path-to-script/shutdown.sh ExecStop=/path/shutdown.sh

Thank You!