#!/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 \ ORIGIN_URL=https://images.iamfabulous.de \ ./$APP