Mercurial Hosting > luan
view host/start.sh @ 2036:2740f8a9ba3a acme-tiny tip
First test prototype (also convert spaces to tabs and remove *.orig files)
| author | Violet7 |
|---|---|
| date | Wed, 05 Nov 2025 21:49:39 -0800 |
| parents | fa8304b060d9 |
| children |
line wrap: on
line source
#!/bin/bash set -e . check_app.sh; checkStopped; . luan string:; mkdir -p logs 2>/dev/null; touch started.lock; sudo $(which nginx) -c $(pwd)/local/nginx.conf; if [ "$1" == "launchd" ]; then java -Xms1024M -classpath $CLASSPATH luan.Luan run_host.luan logs 1>logs/stdout.log 2>logs/stderr.log else java -Xms1024M -classpath $CLASSPATH luan.Luan run_host.luan logs 1>logs/stdout.log 2>logs/stderr.log & getPids; if [ "$PIDS" == "" ]; then #seconds to wait toWait=10; i=0; while [ $i -lt $toWait ]; do sleep 1; getPids; if [ "$PIDS" != "" ]; then break fi; let i=$i+1; done; fi; checkRunning; fi;
