summaryrefslogtreecommitdiff
path: root/run.sh
blob: 35e114af772c260636173b25927057813dac1e43 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/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..."

export PORT=8087
STATIC_DIR=$(pwd)/static \
IMGUR_GO_CONF=$(pwd)/config/conf.json \
UPLOAD_DIR=$(pwd)/files \
UPLOAD_URL=http://i.iamfabulous.de \
ORIGIN_URL=https://images.iamfabulous.de \
./$APP