Mastering System Events: Script Execution With @Reboot And Systemd
This article provides a detailed explanation of how to run scripts before and after system events such as startup, suspend, and shutdown. It covers using the @reboot
command with crontab -e
for startup event management and explains how to write scripts in /lib/systemd/system-*
directories for handling other system events.
execute script before & after system events like startup, suspend & shutdown
for startup use @reboot
with crontab -e
for others, write scripts under /lib/systemd/system-*