Better updates
This commit is contained in:
@@ -2,8 +2,7 @@
|
|||||||
|
|
||||||
# Print the logo
|
# Print the logo
|
||||||
print_logo() {
|
print_logo() {
|
||||||
cat << "EOF"
|
cat << "EOF"
|
||||||
|
|
||||||
|
|
||||||
██╗ ██╗ █████╗ ███╗ ███╗██████╗ █████╗ ██████╗██╗ ██╗
|
██╗ ██╗ █████╗ ███╗ ███╗██████╗ █████╗ ██████╗██╗ ██╗
|
||||||
██║ ██║██╔══██╗████╗ ████║██╔══██╗██╔══██╗██╔════╝██║ ██╔╝
|
██║ ██║██╔══██╗████╗ ████║██╔══██╗██╔══██╗██╔════╝██║ ██╔╝
|
||||||
@@ -12,6 +11,14 @@ print_logo() {
|
|||||||
██║ ██║██║ ██║██║ ╚═╝ ██║██║ ██║ ██║╚██████╗██║ ██╗
|
██║ ██║██║ ██║██║ ╚═╝ ██║██║ ██║ ██║╚██████╗██║ ██╗
|
||||||
╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝
|
╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝
|
||||||
|
|
||||||
|
███████╗███████╗██████╗ ██╗ ██╗███████╗██████╗
|
||||||
|
██╔════╝██╔════╝██╔══██╗██║ ██║██╔════╝██╔══██╗
|
||||||
|
███████╗█████╗ ██████╔╝██║ ██║█████╗ ██████╔╝
|
||||||
|
╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██╔══╝ ██╔══██╗
|
||||||
|
███████║███████╗██║ ██║ ╚████╔╝ ███████╗██║ ██║
|
||||||
|
╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚══════╝╚═╝ ╚═╝
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
@@ -23,3 +30,22 @@ print_logo
|
|||||||
echo "Let's get the lastest changes to HamPack..."
|
echo "Let's get the lastest changes to HamPack..."
|
||||||
|
|
||||||
wget -qO- https://gitea.young.computer/david/HamPackServer/raw/branch/main/install.sh | bash
|
wget -qO- https://gitea.young.computer/david/HamPackServer/raw/branch/main/install.sh | bash
|
||||||
|
|
||||||
|
# Check whether the running kernel matches the installed modules — if not, a
|
||||||
|
# newer kernel was installed during this run and a reboot is required
|
||||||
|
if ! ls /usr/lib/modules/$(uname -r) > /dev/null 2>&1; then
|
||||||
|
echo "A newer kernel has been installed, a reboot is recommended."
|
||||||
|
read -rp "Reboot now? [y/N] " response
|
||||||
|
case "$response" in
|
||||||
|
[yY][eE][sS]|[yY])
|
||||||
|
echo "Rebooting..."
|
||||||
|
sudo reboot
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Reboot skipped. Please remember to reboot when convenient."
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
else
|
||||||
|
echo "Kernel is up to date, no reboot needed. You may want to consider a reboot if other significant software was updated or installed."
|
||||||
|
fi
|
||||||
|
|||||||
@@ -2,8 +2,7 @@
|
|||||||
|
|
||||||
# Print the logo
|
# Print the logo
|
||||||
print_logo() {
|
print_logo() {
|
||||||
cat << "EOF"
|
cat << "EOF"
|
||||||
|
|
||||||
|
|
||||||
██╗ ██╗ █████╗ ███╗ ███╗██████╗ █████╗ ██████╗██╗ ██╗
|
██╗ ██╗ █████╗ ███╗ ███╗██████╗ █████╗ ██████╗██╗ ██╗
|
||||||
██║ ██║██╔══██╗████╗ ████║██╔══██╗██╔══██╗██╔════╝██║ ██╔╝
|
██║ ██║██╔══██╗████╗ ████║██╔══██╗██╔══██╗██╔════╝██║ ██╔╝
|
||||||
@@ -12,6 +11,14 @@ print_logo() {
|
|||||||
██║ ██║██║ ██║██║ ╚═╝ ██║██║ ██║ ██║╚██████╗██║ ██╗
|
██║ ██║██║ ██║██║ ╚═╝ ██║██║ ██║ ██║╚██████╗██║ ██╗
|
||||||
╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝
|
╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝
|
||||||
|
|
||||||
|
███████╗███████╗██████╗ ██╗ ██╗███████╗██████╗
|
||||||
|
██╔════╝██╔════╝██╔══██╗██║ ██║██╔════╝██╔══██╗
|
||||||
|
███████╗█████╗ ██████╔╝██║ ██║█████╗ ██████╔╝
|
||||||
|
╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██╔══╝ ██╔══██╗
|
||||||
|
███████║███████╗██║ ██║ ╚████╔╝ ███████╗██║ ██║
|
||||||
|
╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚══════╝╚═╝ ╚═╝
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
@@ -40,7 +47,32 @@ else
|
|||||||
yay -Sua --noconfirm
|
yay -Sua --noconfirm
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Will need to update the downloaded binaries and the compiled apps
|
# Updating the repo and installing...
|
||||||
# In the area below...
|
echo "Updating HamPackServer..."
|
||||||
|
|
||||||
echo "Done. You probably want to reboot your system..."
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
|
|
||||||
|
echo "Pulling latest HamPackServer repo..."
|
||||||
|
git -C "$SCRIPT_DIR" pull
|
||||||
|
|
||||||
|
echo "Running install.sh..."
|
||||||
|
bash "$SCRIPT_DIR/install.sh"
|
||||||
|
|
||||||
|
# Check whether the running kernel matches the installed modules — if not, a
|
||||||
|
# newer kernel was installed during this run and a reboot is required
|
||||||
|
if ! ls /usr/lib/modules/$(uname -r) > /dev/null 2>&1; then
|
||||||
|
echo "A newer kernel has been installed, a reboot is recommended."
|
||||||
|
read -rp "Reboot now? [y/N] " response
|
||||||
|
case "$response" in
|
||||||
|
[yY][eE][sS]|[yY])
|
||||||
|
echo "Rebooting..."
|
||||||
|
sudo reboot
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Reboot skipped. Please remember to reboot when convenient."
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
else
|
||||||
|
echo "Kernel is up to date, no reboot needed. You may want to consider a reboot if other significant software was updated or installed."
|
||||||
|
fi
|
||||||
|
|||||||
19
install.sh
19
install.sh
@@ -220,3 +220,22 @@ case "$response" in
|
|||||||
echo "Reboot skipped. Please reboot when convenient."
|
echo "Reboot skipped. Please reboot when convenient."
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
# Check whether the running kernel matches the installed modules — if not, a
|
||||||
|
# newer kernel was installed during this run and a reboot is required
|
||||||
|
if ! ls /usr/lib/modules/$(uname -r) > /dev/null 2>&1; then
|
||||||
|
echo "A newer kernel has been installed, a reboot is recommended."
|
||||||
|
read -rp "Reboot now? [y/N] " response
|
||||||
|
case "$response" in
|
||||||
|
[yY][eE][sS]|[yY])
|
||||||
|
echo "Rebooting..."
|
||||||
|
sudo reboot
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Reboot skipped. Please remember to reboot when convenient."
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
else
|
||||||
|
echo "Kernel is up to date, no reboot needed. You may want to consider a reboot if other significant software was updated or installed."
|
||||||
|
fi
|
||||||
Reference in New Issue
Block a user