From 168d7f1fd019f14d6f44de4525e36eff318b7d80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lauri=20V=C3=B5sandi?= Date: Mon, 3 May 2021 08:14:13 +0000 Subject: [PATCH] More PID handling fixes --- Dockerfile | 3 ++- entrypoint-openvpn.sh | 5 +++-- entrypoint-strongswan.sh | 6 ++++-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0809ed6..d42d502 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,7 +12,8 @@ RUN apt-get update -qq \ && apt-get install -y -qq \ python3-pip \ openvpn \ - strongswan + strongswan \ + libcharon-extra-plugins # Dump on console what modules StrongSwan attempts to load RUN echo '#!/bin/bash' > /usr/sbin/modprobe \ diff --git a/entrypoint-openvpn.sh b/entrypoint-openvpn.sh index 3d4bfdc..a9cfac1 100755 --- a/entrypoint-openvpn.sh +++ b/entrypoint-openvpn.sh @@ -1,7 +1,8 @@ #!/bin/sh -rm -fv /run/certidude/*.pid -sleep 10 set -e +set -x +rm -fv /run/*.pid /var/run/*.pid /run/*/*.pid /var/run/*/*.pid +sleep 10 $@ AUTHORITY=$3 test -f /etc/certidude/authority/$AUTHORITY/host_cert.pem diff --git a/entrypoint-strongswan.sh b/entrypoint-strongswan.sh index bead603..ab93caa 100755 --- a/entrypoint-strongswan.sh +++ b/entrypoint-strongswan.sh @@ -1,8 +1,10 @@ #!/bin/sh -rm -fv /run/certidude/*.pid -sleep 10 set -e +set -x +rm -fv /run/*.pid /var/run/*.pid /run/*/*.pid /var/run/*/*.pid +sleep 10 $@ AUTHORITY=$3 test -f /etc/certidude/authority/$AUTHORITY/host_cert.pem +/usr/sbin/ipsec stop /usr/sbin/ipsec start --nofork