X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=server%2Frun.sh;h=76a7a486b577b26732e3d06e9ec822150ae0ed4f;hb=5a9a05166c4b22e7b7a522063d3dd6f75d1fa589;hp=0e52fd9f39d10b0e62516113d0a589fdc72053af;hpb=e5f75202a0c2aaefc6c0555c685661880054bd0c;p=matches%2FMCTX3420.git diff --git a/server/run.sh b/server/run.sh index 0e52fd9..76a7a48 100755 --- a/server/run.sh +++ b/server/run.sh @@ -10,9 +10,9 @@ fi if [[ "$(uname -m)" != *arm* ]]; then echo Not running on the BBB # Use this to quickly test run the server in valgrind - spawn-fcgi -p9005 -n ./valgrind.sh + #spawn-fcgi -p9005 -n ./valgrind.sh # Use this to run the server normally - #spawn-fcgi -p9005 -n ./server + spawn-fcgi -p9005 -n ./server exit 0 fi @@ -83,6 +83,9 @@ echo "Parameters are: $parameters" # Run the program with parameters # TODO: Can tell spawn-fcgi to run the program as an unprivelaged user? # But first will have to work out how to set PWM/GPIO as unprivelaged user +# NOTE: Having the program automatically restart itself after a *FATAL ERROR* doesn't seem like such a good idea now +# (Some things that call Fatal happen under circumstances where they will just keep calling Fatal every time the program starts) +# Change the number of fails to 1 for now. We can potentially use different error codes for different types of errors, but that seems overkill. fails=0 while [ $fails -lt 1 ]; do spawn-fcgi -p9005 -n -- ./server $parameters