From 959749d6ed43f817eb4943002037e4661568c381 Mon Sep 17 00:00:00 2001 From: "flow.gunso" Date: Thu, 30 Jan 2020 17:45:59 +0100 Subject: [PATCH] Call the Python healthcheck script as the seafile user --- seafile-client/docker-healthcheck.sh | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/seafile-client/docker-healthcheck.sh b/seafile-client/docker-healthcheck.sh index 298f5e9..3a581c7 100755 --- a/seafile-client/docker-healthcheck.sh +++ b/seafile-client/docker-healthcheck.sh @@ -19,10 +19,6 @@ # Grab the status of the active repos then return as healthy/unhealthy # depending the healthy statuses. -healthy_statuses=("downloading" "waiting for sync", "uploading", "downloading files", "downloading file list") -while IFS=$'\t' read -r name status; do - for healthy_status in "${healthy_statuses[@]}"; do - if [[ "$status" == "$healthy" ]]; then exit 0; fi - done - exit 1 -done < <(seaf-cli status | grep -v "^#") +su - $UNAME << EO + ~/healthcheck.py -c ~/.seafile/seafile-data/ $SEAF_LIBRARY_UUID +EO \ No newline at end of file