Update linupx-scripts.sh

This commit is contained in:
2022-04-09 16:58:58 -05:00
parent a05c7a5565
commit 26fbc5363f

View File

@@ -68,12 +68,17 @@ UPDATE1() {
if type yum &>/dev/null; then
$APTFUNC -y update
else
if [ "$useAutoremove" -ne 0 ]; then
AUTOREMOVE
$APTFUNC update
$APTFUNC upgrade -y
AUTOREMOVE
fi
if [ "$useAutoremove" -ne 0 ]; then; AUTOREMOVE; fi
$APTFUNC update
$APTFUNC upgrade -y
read -n 1 -p "Would you like to run dist-upgrade as well (Y/n)?" choice
case "$choice" in
[Yy]) $APTFUNC dist-upgrade;;
esac
if [ "$useAutoremove" -ne 0 ]; then; AUTOREMOVE; fi
fi
if [ "$opennms" = true ]; then
sudo apt-mark hold libopennms-java libopennmsdeps-java opennms-common opennms-db
@@ -88,14 +93,22 @@ UPDATE2() {
if [ "$opennms" = true ]; then
sudo apt-mark unhold libopennms-java libopennmsdeps-java opennms-common opennms-db
fi
if [ "$useAutoremove" -ne 0 ]; then
AUTOREMOVE
$APTFUNC upgrade -y
AUTOREMOVE
fi
if [ "$useAutoremove" -ne 0 ]; then; AUTOREMOVE; fi
$APTFUNC upgrade -y
read -n 1 -p "Would you like to run dist-upgrade as well (Y/n)?" choice
case "$choice" in
[Yy]) $APTFUNC dist-upgrade;;
esac
if [ "$useAutoremove" -ne 0 ]; then; AUTOREMOVE; fi
if [ "$opennms" = true ]; then
sudo apt-mark hold libopennms-java libopennmsdeps-java opennms-common opennms-db
fi
touch "${FOLDER}/lastrun"
echo ""
echo -e "${Green}Updated Upgrades have completed${Color_Off}"