diff --git a/backup_new.sh b/backup_new.sh index 76c0e8d..de9275c 100755 --- a/backup_new.sh +++ b/backup_new.sh @@ -187,6 +187,34 @@ while [ $# -gt 0 ]; do badParam empty "$@" fi ;; + --seafile-service) + # name of seafile service + if [ -n "$2" ]; then + if ! systemctl list-unit-files | grep -Eq "^$2 |^$2.service" + then + badParam svc "$@" + else + seafService="${2}" + shift + fi + else + badParam empty "$@" + fi + ;; + --seahub-service) + # name of seahub service + if [ -n "$2" ]; then + if ! systemctl list-unit-files | grep -Eq "^$2 |^$2.service" + then + badParam svc "$@" + else + seafHub="${2}" + shift + fi + else + badParam empty "$@" + fi + ;; -o|--offline) # shutdown seafile during backup offlineBackup=1