Mercurial Hosting > luan
comparison host/check_app.sh @ 1628:520707a70379
add host
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Tue, 07 Dec 2021 23:29:58 -0700 |
parents | |
children | 665049cffc02 |
comparison
equal
deleted
inserted
replaced
1627:07be5015159d | 1628:520707a70379 |
---|---|
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 } |