Mercurial Hosting > luan
comparison host/start.sh @ 1628:520707a70379
add host
| author | Franklin Schmidt <fschmidt@gmail.com> |
|---|---|
| date | Tue, 07 Dec 2021 23:29:58 -0700 |
| parents | |
| children | b735ed134662 |
comparison
equal
deleted
inserted
replaced
| 1627:07be5015159d | 1628:520707a70379 |
|---|---|
| 1 #!/bin/bash | |
| 2 | |
| 3 set -e | |
| 4 | |
| 5 #seconds to wait | |
| 6 toWait=10; | |
| 7 i=0; | |
| 8 | |
| 9 . check_app.sh; | |
| 10 checkStopped; | |
| 11 | |
| 12 . luan string:; | |
| 13 | |
| 14 mkdir -p logs 2>/dev/null; | |
| 15 | |
| 16 touch started.lock; | |
| 17 | |
| 18 if [ "$1" == "launchd" ]; then | |
| 19 java -Xms1024M -classpath $CLASSPATH luan.Luan run.luan logs 1>logs/stdout.log 2>logs/stderr.log | |
| 20 else | |
| 21 java -Xms1024M -classpath $CLASSPATH luan.Luan run.luan logs 1>logs/stdout.log 2>logs/stderr.log & | |
| 22 | |
| 23 getPids; | |
| 24 if [ "$PIDS" == "" ]; then | |
| 25 while [ $i -lt $toWait ]; do | |
| 26 sleep 1; | |
| 27 getPids; | |
| 28 if [ "$PIDS" != "" ]; then | |
| 29 break | |
| 30 fi; | |
| 31 let i=$i+1; | |
| 32 done; | |
| 33 fi; | |
| 34 | |
| 35 checkRunning; | |
| 36 fi; | |
| 37 | |
| 38 #sudo /usr/local/bin/nginx -c $(pwd)/local/nginx.conf; |
