Zum Inhalt springen

Update.sh: Unterschied zwischen den Versionen

Aus Foxwiki
Keine Bearbeitungszusammenfassung
K Textersetzung - „line>“ durch „line copy>“
 
Zeile 1: Zeile 1:
<syntaxhighlight lang="bash" highlight="" line>
<syntaxhighlight lang="bash" highlight="" line copy>
#!/bin/sh
#!/bin/sh
# Variable Declaration
# Variable Declaration

Aktuelle Version vom 11. Mai 2025, 13:45 Uhr

#!/bin/sh
# Variable Declaration
host=$(cat /etc/hostname)
logFile=update.log
echo "Unattached Advanced Package Tool version 0.1"
echo "Created by JaganGanesh."
echo "System: $host\n"
echo "Re-syncing Package Index Files.."
echo "\n$(date)\n" >> $logFile
apt update >> $logFile
echo "Upgrading Packages.."
apt -y upgrade >> $logFile
echo "Upgrading Operating System.."
apt -y dist-upgrade >> $logFile
echo "Removing Unwanted Packages.."
apt -y autoremove >> $logFile
echo "Cleaning Retrieved Package Files.."
apt -y autoclean >> $logFile
echo "Cleaning Local Repository.."
apt clean >> $logFile
echo "\nAll Done, Have a Great Day!\n"