parameters for custom service names

This commit is contained in:
Asif Bacchus 2019-05-24 00:31:07 -06:00
parent 9d007a67ca
commit c0e77c7336

View File

@ -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