Created
September 26, 2023 21:31
-
-
Save adililhan/f068ffc4cf2321293b59ccb77c0c78d6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
trap control_t SIGTERM | |
function control_t() { | |
echo "SIGTERM detected" | |
echo "... Disk cleanup started ..." | |
sleep 45 | |
echo "... Disk cleanup is complete ..." | |
exit 0 | |
} | |
for i in `seq 1 86400`; do | |
sleep 1 | |
date | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment