#!/bin/sh # $1 Dateiname # $2 Wurzelverzeichnis für -C # $3 CpuArchitektur x86_64, arm,..... case $1 in *.tar.gz) echo ">>>>>>>>>>> Tarfile" >> /tmp/UpdateAndReboot.log if [ $3 != "x86_64" ] then sudo tar -C $2 -xzvf $1 echo "sync disks" sync echo "reboot System" reboot fi ;; *.sh) echo ">>>>>>>>>>> Scriptfile" >> /tmp/UpdateAndReboot.log if [ $3 != "x86_64" ] then sudo sh $1 >> /tmp/UpdateAndReboot.log echo "sync disks" sync echo "reboot System" reboot fi ;; esac