summaryrefslogtreecommitdiff
path: root/contrib/docker/docker-entrypoint.sh
blob: 7f98ef68bb512c70ffdc5c1207128983ca3b997e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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