Now port and APPDIR are configurable.
authorphilipp <philipp@7aebc617-e5e2-0310-91dc-80fb5f6d2477>
Thu, 9 May 2019 19:04:34 +0000 (19:04 +0000)
committerphilipp <philipp@7aebc617-e5e2-0310-91dc-80fb5f6d2477>
Thu, 9 May 2019 19:04:34 +0000 (19:04 +0000)
git-svn-id: http://www.winterrodeln.org/svn/wrfeed/trunk@2806 7aebc617-e5e2-0310-91dc-80fb5f6d2477

wrfeed_webapp.sh

index 42aca17e6127331960e5ad61d84514b38f863640..ec8450718d375cebabffa57473a9ec9b3746c349 100755 (executable)
@@ -1,5 +1,12 @@
 #!/bin/sh
 
+ME=$(basename $0)
+DIR=$(dirname $0)
+ARG=$1
+APPDIR=$DIR
+PORT=8766
+
+
 die() {
        echo "$1" >&2
        usage
@@ -10,17 +17,13 @@ usage() {
        echo "Usage: ./$ME <start|stop|restart>." >&2
 }
 
-ME=$(basename $0)
-DIR=$(dirname $0)
-ARG=$1
-
 set -eu
 
 [ -n "$ARG" ] || die "Missing argument."
 
 start() {
-       cd "$DIR"
-       WRFEED_SETTINGS=development.cfg waitress-serve --listen=[::1]:8766 'wrfeed:app' &
+       cd "$APPDIR"
+       WRFEED_SETTINGS=development.cfg waitress-serve --listen=[::1]:$PORT 'wrfeed:app' &
 }
 
 stop() {