diff options
Diffstat (limited to 'run.sh')
| -rwxr-xr-x | run.sh | 29 |
1 files changed, 29 insertions, 0 deletions
@@ -0,0 +1,29 @@ +#!/bin/sh +set -e + +APP="mandible" +compile=0 + +if [ "x$1" != "x" ]; then + compile=1 +fi + +if [ ! -x $APP ] || [ $compile == 1 ]; then + echo "Compiling $APP..." + echo + go build +fi + +if pgrep $APP > /dev/null; then + echo "Killing running instance of $APP..." + echo + pkill $APP +fi + +echo "Running $APP..." + +STATIC_DIR=$(pwd)/static \ +IMGUR_GO_CONF=$(pwd)/config/conf.json \ +UPLOAD_DIR=$(pwd)/files \ +UPLOAD_URL=http://i.iamfabulous.de:8080 \ +./$APP |
