Mercurial Hosting > luan
annotate host/start.sh @ 2024:fa8304b060d9
rename launching luan files
| author | Franklin Schmidt <fschmidt@gmail.com> |
|---|---|
| date | Wed, 29 Oct 2025 21:12:53 -0600 |
| parents | 665049cffc02 |
| children |
| rev | line source |
|---|---|
| 1628 | 1 #!/bin/bash |
| 2 set -e | |
| 3 | |
| 4 . check_app.sh; | |
| 5 checkStopped; | |
| 6 | |
| 7 . luan string:; | |
| 8 | |
| 9 mkdir -p logs 2>/dev/null; | |
| 10 | |
| 11 touch started.lock; | |
| 1633 | 12 sudo $(which nginx) -c $(pwd)/local/nginx.conf; |
| 1628 | 13 if [ "$1" == "launchd" ]; then |
|
2024
fa8304b060d9
rename launching luan files
Franklin Schmidt <fschmidt@gmail.com>
parents:
1633
diff
changeset
|
14 java -Xms1024M -classpath $CLASSPATH luan.Luan run_host.luan logs 1>logs/stdout.log 2>logs/stderr.log |
| 1628 | 15 else |
|
2024
fa8304b060d9
rename launching luan files
Franklin Schmidt <fschmidt@gmail.com>
parents:
1633
diff
changeset
|
16 java -Xms1024M -classpath $CLASSPATH luan.Luan run_host.luan logs 1>logs/stdout.log 2>logs/stderr.log & |
| 1628 | 17 |
| 18 getPids; | |
| 19 if [ "$PIDS" == "" ]; then | |
|
2024
fa8304b060d9
rename launching luan files
Franklin Schmidt <fschmidt@gmail.com>
parents:
1633
diff
changeset
|
20 #seconds to wait |
|
fa8304b060d9
rename launching luan files
Franklin Schmidt <fschmidt@gmail.com>
parents:
1633
diff
changeset
|
21 toWait=10; |
|
fa8304b060d9
rename launching luan files
Franklin Schmidt <fschmidt@gmail.com>
parents:
1633
diff
changeset
|
22 i=0; |
| 1628 | 23 while [ $i -lt $toWait ]; do |
| 24 sleep 1; | |
| 25 getPids; | |
| 26 if [ "$PIDS" != "" ]; then | |
| 27 break | |
| 28 fi; | |
| 29 let i=$i+1; | |
| 30 done; | |
| 31 fi; | |
| 32 | |
| 33 checkRunning; | |
| 34 fi; |
