Mercurial Hosting > luan
annotate host/check_app.sh @ 1629:124887e02dab
minor
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Tue, 07 Dec 2021 23:39:48 -0700 |
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 } |