From 01e9a34952bd6ddd383680b0ca2312e476ad07a6 Mon Sep 17 00:00:00 2001 From: horus_arch Date: Sun, 19 Apr 2015 22:09:52 +0200 Subject: Initial commit. --- run.sh | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100755 run.sh (limited to 'run.sh') diff --git a/run.sh b/run.sh new file mode 100755 index 0000000..ab368b0 --- /dev/null +++ b/run.sh @@ -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 -- cgit v1.2.3