trilium/DockerHealthcheck.sh

7 lines
148 B
Bash
Raw Normal View History

2022-06-18 22:10:26 +08:00
#!/bin/sh
if wget --spider -S "127.0.0.1:8080/api/health-check" 2>&1 | awk 'NR==2' | grep -w "HTTP/1.1 200 OK" ; then
2022-06-18 22:10:26 +08:00
exit 0
else
exit 1
fi