Mercurial Hosting > luan
annotate 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 |
rev | line source |
---|---|
1628 | 1 PIDS=""; |
2 | |
3 function getPids() { | |
4 PIDS=$(ps ax | awk '{if($0~"[r]un.luan"){print $1}}'); | |
5 } | |
6 | |
7 function checkStopped() { | |
8 getPids; | |
9 if [ "$PIDS" != "" ]; then | |
10 echo "App already running"; | |
11 exit 0; | |
12 fi; | |
13 } | |
14 | |
15 function checkRunning() { | |
16 getPids; | |
17 if [ "$PIDS" != "" ]; then | |
18 echo "App running"; | |
19 else | |
20 echo "App not running"; | |
21 exit 0; | |
22 fi; | |
23 } |