From 15d8651f085c50370fd3bb72550df45f66094abf Mon Sep 17 00:00:00 2001 From: hwdsl2 Date: Sun, 17 Apr 2022 15:25:20 -0500 Subject: [PATCH] Update Alpine script - Restart ipsec service on failure on Alpine Linux. Ref: https://github.com/hwdsl2/docker-ipsec-vpn-server/commit/7f2fa159a7a50f821fab11f09a14bc323ff80b04 - Cleanup --- vpnsetup_alpine.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/vpnsetup_alpine.sh b/vpnsetup_alpine.sh index ee0068c..fbcd13b 100755 --- a/vpnsetup_alpine.sh +++ b/vpnsetup_alpine.sh @@ -498,13 +498,24 @@ start_services() { bigecho "Starting services..." sysctl -e -q -p - chmod +x /etc/rc.local chmod 600 /etc/ipsec.secrets* /etc/ppp/chap-secrets* /etc/ipsec.d/passwd* mkdir -p /run/pluto service fail2ban restart >/dev/null 2>&1 service ipsec restart >/dev/null 2>&1 service xl2tpd restart >/dev/null 2>&1 + + mkdir -p /etc/crontabs + cron_cmd="rc-service -c ipsec zap start" +if ! grep -qs "$cron_cmd" /etc/crontabs/root; then +cat >> /etc/crontabs/root <