forked from darklynx/request-baskets
-
Notifications
You must be signed in to change notification settings - Fork 0
/
entrypoint.sh
executable file
·59 lines (44 loc) · 870 Bytes
/
entrypoint.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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/bin/sh
if [ -z "$LISTEN" ]; then
LISTEN="0.0.0.0"
fi
if [ -z "$DB" ]; then
DB="bolt"
fi
if [ -z "$FILE" ]; then
FILE="/var/lib/rbaskets/baskets.db"
fi
args="-l $LISTEN -db $DB -file $FILE"
if [ -n "$CONN" ]; then
args="$args -conn $CONN"
fi
if [ -n "$PORT" ]; then
args="$args -p $PORT"
fi
if [ -n "$PAGE" ]; then
args="$args -page $PAGE"
fi
if [ -n "$SIZE" ]; then
args="$args -size $SIZE"
fi
if [ -n "$MAXSIZE" ]; then
args="$args -maxsize $MAXSIZE"
fi
if [ -n "$TOKEN" ]; then
args="$args -token $TOKEN"
fi
if [ -n "$BASKET" ]; then
args="$args -basket $BASKET"
fi
if [ -n "$PATHPREFIX" ]; then
args="$args -prefix $PATHPREFIX"
fi
if [ -n "$MODE" ]; then
args="$args -mode $MODE"
fi
if [ -n "$THEME" ]; then
args="$args -theme $THEME"
fi
cmd="/bin/rbaskets $args"
echo "Executing: $cmd"
exec $cmd