aboutsummaryrefslogtreecommitdiff
path: root/al2-wireguard/entrypoint.sh
blob: 93f59de131d76f8b81dafeb4cf34a4e237fbaeda (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh

# This needs the SYS_MODULES and NET_ADMIN capabilities
#
# /etc/wireguard should be mounted and include wg-quick configs
#
# /lib/modules/$(uname -r) should be mounted to same in container

modprobe ip6_udp_tunnel
modprobe udp_tunnel

insmod /opt/wireguard/wireguard.ko

for i in /etc/wireguard/*; do
    wg-quick up "$(basename ${i/.conf/})"
done

exec "$@"