Call the Python healthcheck script as the seafile user
This commit is contained in:
@@ -19,10 +19,6 @@
|
|||||||
# Grab the status of the active repos then return as healthy/unhealthy
|
# Grab the status of the active repos then return as healthy/unhealthy
|
||||||
# depending the healthy statuses.
|
# depending the healthy statuses.
|
||||||
|
|
||||||
healthy_statuses=("downloading" "waiting for sync", "uploading", "downloading files", "downloading file list")
|
su - $UNAME << EO
|
||||||
while IFS=$'\t' read -r name status; do
|
~/healthcheck.py -c ~/.seafile/seafile-data/ $SEAF_LIBRARY_UUID
|
||||||
for healthy_status in "${healthy_statuses[@]}"; do
|
EO
|
||||||
if [[ "$status" == "$healthy" ]]; then exit 0; fi
|
|
||||||
done
|
|
||||||
exit 1
|
|
||||||
done < <(seaf-cli status | grep -v "^#")
|
|
||||||
Reference in New Issue
Block a user