Mercurial Hosting > luan
view host/check_app.sh @ 1631:35c626c06dd5
add startup scripts for mac os
author | fffilimonov |
---|---|
date | Mon, 13 Dec 2021 09:14:52 +0000 |
parents | 520707a70379 |
children | 665049cffc02 |
line wrap: on
line source
PIDS=""; 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; }