add signal trap

This commit is contained in:
tengel 2024-03-20 11:28:46 -05:00
parent 5317f2db1c
commit 00c927a7e7

View file

@ -2,6 +2,12 @@
#
# SPDX-License-Identifier: MIT
function error_exit {
echo "Trapped a kill signal, exiting."
exit 1
}
trap error_exit SIGHUP SIGINT SIGTERM SIGQUIT
sudo journalctl --vacuum-time 30d
pikaur -Sc --noconfirm
paccache -c ~/.cache/pikaur/pkg/ -vrk1