diff --git a/backup_new.sh b/backup_new.sh index 8e791a4..fec6e46 100755 --- a/backup_new.sh +++ b/backup_new.sh @@ -249,6 +249,24 @@ if [ $use503 -eq 1 ]; then printf "${cyan}[%s] -- [INFO] Using 503 functionality --${norm}\n" \ "$(stamp)" >> "$logFile" fi +# seafile directories +if [ ! -d "$seafDir" ]; then + badParam dne "(--seafdir default)" "$seafDir" +elif [ ! -d "$seafData" ]; then + badParam dne "(--seafdata default)" "$seafData" +fi +# offline backup +if [ $offlineBackup -eq 1 ]; then + if ! systemctl list-unit-files | \ + grep -Eq "^$seafService |^$seafService.service" + then + badParam svc "(--seafile-service default)" "$seafService" + elif ! systemctl list-unit-files | \ + grep -Eq "^$seafHub |^$seafHub.service" + then + badParam svc "(--seahub-service default)" "$seafHub" + fi +fi ### start logging