From: Bastian Dehn Date: Wed, 7 Nov 2018 18:58:42 +0000 (+0100) Subject: add: Fehlermeldung pfad Datei X-Git-Url: https://gitweb.hhaalo.de/?a=commitdiff_plain;h=1e4455c168cfabb0f62ee47aa83cf30d719e424b;p=simple-backup.git add: Fehlermeldung pfad Datei --- diff --git a/backup b/backup index eb3b321..cad62de 100755 --- a/backup +++ b/backup @@ -30,7 +30,7 @@ SetDefaultVariables() mode="incremental" if [ ! -d "$backpath" ]; then - printf "FEHLER: %s existiert nicht!\n" "$backpath" + printf "FEHLER: Verzeichnis %s existiert nicht!\n" "$backpath" exit 1 fi } @@ -228,6 +228,10 @@ BackupPackages() BackupPathes() { + if [ ! -f "pfad-$remoterechner" ]; then + printf "FEHLER: pfad-%s existiert nicht!\n" "$remoterechner" + fi + for pfad in $(cat pfad-$remoterechner.txt); do if [ "$pfad" == "virsh" ]; then BackupVMs @@ -242,11 +246,12 @@ BackupPathes() BackupRemotePC() { if [ ! -f "rechner" ]; then - printf "FEHLER: file rechner not exists!\n" + printf "FEHLER: Datei rechner existiert nicht!\n" exit 1 fi local rech="" + for rech in $(cat rechner); do CreateBackupFolderRemotePC GetHardLinkOpts