forked from adept/hledger-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstart.sh
executable file
·24 lines (22 loc) · 905 Bytes
/
start.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/bash
echo "host: ${HLEDGER_HOST:=0.0.0.0}"
echo "port: ${HLEDGER_PORT:=5000}"
echo "base url: ${HLEDGER_BASE_URL:="http://localhost:$HLEDGER_PORT"}"
echo "file url: ${HLEDGER_FILE_URL:=}"
echo "input file: ${HLEDGER_JOURNAL_FILE:=/data/hledger.journal}"
echo "debug level: ${HLEDGER_DEBUG:=1}"
echo "rules file: ${HLEDGER_RULES_FILE:=/data/hledger.rules}"
echo "capabilities: ${HLEDGER_CAPABILITIES:=view,add}"
echo "extra_args: ${HLEDGER_ARGS:=$@}"
echo "---------------------------------------------------------------"
exec hledger-web \
--server \
--host=$HLEDGER_HOST \
--port=$HLEDGER_PORT \
--file="$HLEDGER_JOURNAL_FILE" \
--debug=$HLEDGER_DEBUG \
--base-url=$HLEDGER_BASE_URL \
--file-url=$HLEDGER_FILE_URL \
--rules-file="$HLEDGER_RULES_FILE" \
--capabilities=$HLEDGER_CAPABILITIES \
${HLEDGER_ARGS:="$@"}