mirror of
https://github.com/zebrajr/HomeLab.git
synced 2026-01-15 12:15:06 +00:00
add timeshift snapshot to update&shutdown
This commit is contained in:
@@ -22,6 +22,25 @@ echo ""
|
||||
echo "sudo permissions available. Starting"
|
||||
echo ""
|
||||
|
||||
|
||||
if which "timeshift" &> /dev/null; then
|
||||
echo ""
|
||||
echo "Making snapshot with timeshift"
|
||||
echo ""
|
||||
sudo timeshift --create --comments "Pre Updates"
|
||||
else
|
||||
echo ""
|
||||
echo "timeshift is not installed."
|
||||
echo "continuining without making a snapshot"
|
||||
echo ""
|
||||
fi
|
||||
|
||||
|
||||
echo ""
|
||||
echo "Starting Updates"
|
||||
echo ""
|
||||
|
||||
sudo dnf clean all -y
|
||||
sudo dnf check -y
|
||||
sudo dnf check-update -y
|
||||
sudo dnf update -y
|
||||
@@ -29,11 +48,10 @@ sudo flatpak update -y
|
||||
sudo flatpak repair
|
||||
sudo flatpak uninstall --unused -y
|
||||
sudo dnf autoremove -y
|
||||
sudo dnf clean all -y
|
||||
|
||||
|
||||
echo ""
|
||||
echo "Press any key withing $SHUTDOWN_TIMEOUT seconds to cancel shutdown."
|
||||
echo "Press any key within $SHUTDOWN_TIMEOUT seconds to cancel shutdown."
|
||||
echo ""
|
||||
|
||||
if read -t $SHUTDOWN_TIMEOUT -n 1; then
|
||||
|
||||
Reference in New Issue
Block a user