Mercurial Hosting > luan
annotate host/check_app.sh @ 1630:b735ed134662
add nginx and ssl for host
author | fffilimonov |
---|---|
date | Fri, 10 Dec 2021 17:08:17 +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 } |