A systemd unit must invoke a shell script once the daemon’s main process exits and its shutdown sequence has finished. Which [Service] directive specifies this script?
The ExecStopPost directive is executed after systemd has terminated the main process and completed the shutdown sequence, making it the appropriate choice for cleanup. ExecStartPre runs before the daemon starts, ExecStartPost executes immediately after startup, and ExecReload applies only when reloading the service.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is systemd and what role does it play in Linux?
Open an interactive chat with Bash
Can you explain the difference between ExecStopPost and ExecStartPre?
Open an interactive chat with Bash
What are some common use cases for the ExecReload directive?