Mercurial Hosting > luan
view host/check_app.sh @ 2041:cd51e7e31950 acme-tiny
use try/catch/finally to clean up temp dir even on error
| author | Violet7 |
|---|---|
| date | Sun, 09 Nov 2025 01:56:58 -0800 |
| parents | ee75b5c12272 |
| children |
line wrap: on
line source
PIDS=""; export PATH="$PATH:/usr/local/bin"; function getPids() { PIDS=$(ps ax | awk '{if($0~"[r]un_host.luan"){print $1}}'); } function checkStopped() { getPids; if [ "$PIDS" != "" ]; then echo "App already running"; exit 0; fi; } function checkRunning() { getPids; if [ "$PIDS" != "" ]; then echo "App running"; else echo "App not running"; exit 0; fi; }
