On a RHEL server, you are writing a custom .service file for a forking daemon. After systemd has terminated the main PID and finished executing any ExecStop cleanup commands, a separate housekeeping script must run to archive logs. Which [Service] directive should reference this script?
ExecStopPost runs only after systemd confirms that any processes for the unit have been killed and the service is fully stopped. This makes it ideal for archival or cleanup tasks. In contrast, ExecStartPre and ExecStartPost relate to startup, and ExecReload fires solely during a configuration reload and cannot be used for post-shutdown maintenance operations.
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.