Playbook für die Nextcloud Notfalleinrichtung.
This commit is contained in:
21
roles/initnextcloud/files/scripts/updatesys
Executable file
21
roles/initnextcloud/files/scripts/updatesys
Executable file
@@ -0,0 +1,21 @@
|
||||
# System-Updater CC-BY Olli Graf
|
||||
# V 1.6 2019
|
||||
|
||||
VERSION="1.7"
|
||||
TMPFILE="/tmp/updater.txt"
|
||||
|
||||
echo "Updater V ${VERSION}"
|
||||
sudo rm -f ${TMPFILE}
|
||||
sudo apt-get update
|
||||
sudo apt-get dist-upgrade -y --allow-unauthenticated |tee ${TMPFILE}
|
||||
sudo snap refresh
|
||||
sudo apt-get autoremove -y
|
||||
if grep -q linux-header ${TMPFILE}; then
|
||||
echo "reboot nötig"
|
||||
read -n1 -p "Neustart? (J/N)" auswahl
|
||||
if [ "${auswahl}" == "j" ]; then
|
||||
echo "System wird gestartet."
|
||||
sudo reboot
|
||||
fi
|
||||
|
||||
fi
|
Reference in New Issue
Block a user