mirror of
https://github.com/zebrajr/HomeLab.git
synced 2025-12-06 00:20:22 +01:00
add timeshift snapshot to update&shutdown
This commit is contained in:
parent
e4879054a0
commit
0c6449302e
|
|
@ -22,6 +22,25 @@ echo ""
|
||||||
echo "sudo permissions available. Starting"
|
echo "sudo permissions available. Starting"
|
||||||
echo ""
|
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 -y
|
||||||
sudo dnf check-update -y
|
sudo dnf check-update -y
|
||||||
sudo dnf update -y
|
sudo dnf update -y
|
||||||
|
|
@ -29,11 +48,10 @@ sudo flatpak update -y
|
||||||
sudo flatpak repair
|
sudo flatpak repair
|
||||||
sudo flatpak uninstall --unused -y
|
sudo flatpak uninstall --unused -y
|
||||||
sudo dnf autoremove -y
|
sudo dnf autoremove -y
|
||||||
sudo dnf clean all -y
|
|
||||||
|
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo "Press any key withing $SHUTDOWN_TIMEOUT seconds to cancel shutdown."
|
echo "Press any key within $SHUTDOWN_TIMEOUT seconds to cancel shutdown."
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
if read -t $SHUTDOWN_TIMEOUT -n 1; then
|
if read -t $SHUTDOWN_TIMEOUT -n 1; then
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user