-
-
Notifications
You must be signed in to change notification settings - Fork 179
Expand file tree
/
Copy pathdocker-entrypoint.sh
More file actions
27 lines (22 loc) · 693 Bytes
/
docker-entrypoint.sh
File metadata and controls
27 lines (22 loc) · 693 Bytes
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
#!/bin/bash
set -e
if [ ! -d "/data" ]; then
echo "Please mount /data"
exit 1
fi
if [ -z "$EXTERNAL_ADDRESS" ]; then
echo "Please specify EXTERNAL_ADDRESS"
exit 1
fi
touch /data/authorized_keys /data/authorized_controllee_keys
# Allow user to seed the authorized_keys file
if [ ! -z "$SEED_AUTHORIZED_KEYS" ]; then
if [ -s /data/authorized_keys ]; then
echo "authorized_keys is not empty, ignoring SEED_AUTHORIZED_KEYS\n"
else
echo "Seeding authorized_keys...\n"
echo $SEED_AUTHORIZED_KEYS > /data/authorized_keys
fi
fi
cd /app/bin
exec ./server --datadir /data --enable-client-downloads --tls --external_address $EXTERNAL_ADDRESS :2222