Mercurial Hosting > luan
view host/check_app.sh @ 1758:27a2530f04b6
fix reload nginx from startup script
author | Vadim Filimonov <fffilimonov@yandex.ru> |
---|---|
date | Mon, 20 Feb 2023 09:02:20 +0200 |
parents | 665049cffc02 |
children |
line wrap: on
line source
PIDS=""; export PATH="$PATH:/usr/local/bin"; function getPids() { PIDS=$(ps ax | awk '{if($0~"[r]un.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; }