summaryrefslogtreecommitdiff
path: root/contrib/docker/docker-entrypoint.sh
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/docker/docker-entrypoint.sh')
-rw-r--r--contrib/docker/docker-entrypoint.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/contrib/docker/docker-entrypoint.sh b/contrib/docker/docker-entrypoint.sh
new file mode 100644
index 000000000..7f98ef68b
--- /dev/null
+++ b/contrib/docker/docker-entrypoint.sh
@@ -0,0 +1,15 @@
+#!/bin/bash -e
+
+echo "${LOCAL_PORT_RANGE:-49152 65535}" > /proc/sys/net/ipv4/ip_local_port_range
+sed -i 's/$GNUNET_PORT/'${GNUNET_PORT:-2086}'/g' /etc/gnunet.conf
+
+if [[ $# -eq 0 ]]; then
+ exec gnunet-arm \
+ --config=/etc/gnunet.conf \
+ --start \
+ --monitor
+elif [[ -z $1 ]] || [[ ${1:0:1} == '-' ]]; then
+ exec gnunet-arm "$@"
+else
+ exec "$@"
+fi