22#
33# Author: [Cpt. Chaz]
44# Created: [03/07/25]
5- # Updated: [03/07 /25]
5+ # Updated: [04/30 /25] - v1.1
66# Description: A simple Unraid script for updating the un-get packages. This script will update, upgrade, and clean un-gets packages.
77# Place script in the Unraid User Scripts plugin and schedule according to user preference.
88# Status: Tested
2121# This script updates, upgrades, and cleans up un-get packages,
2222# then notifies the Unraid GUI if everything runs smoothly.
2323
24- set -e # Stop immediately on error
24+ set -e # Exit on any error
2525
2626# Ensure un-get is installed
2727if ! command -v un-get > /dev/null 2>&1 ; then
3333echo " Updating package list..."
3434un-get update
3535
36- # Upgrade packages
36+ # Attempt normal upgrade first
3737echo " Upgrading packages..."
38- if ! un-get upgrade --assume-yes ; then # Remove --assume-yes if un-get doesn't support it
39- echo " Upgrade failed, attempting recovery..."
38+ if ! un-get upgrade; then
39+ echo " Upgrade failed, attempting forced recovery..."
4040 un-get clean
4141 un-get update
42- un-get upgrade --assume-yes || { # Remove --assume-yes if needed
43- echo " Automatic recovery failed. Please check manually."
42+ un-get upgrade --force || {
43+ echo " Automatic recovery with --force failed. Please check manually."
4444 exit 1
4545 }
4646fi
@@ -51,3 +51,4 @@ un-get cleanup
5151
5252# Notify success
5353echo " All un-get packages have been updated successfully!"
54+
0 commit comments