From c554fa93635a491cbaec38db3aa117b58ed57a32 Mon Sep 17 00:00:00 2001 From: tunnelpr0 <61991283+tunnelpr0@users.noreply.github.com> Date: Fri, 27 Aug 2021 18:51:58 +0200 Subject: [PATCH] [Update] Adding Alpine Linux support for IPv6 NAT migration (#4244) Added restart options via openrc --- update.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/update.sh b/update.sh index e2c5a8ca..cc8357e6 100755 --- a/update.sh +++ b/update.sh @@ -169,11 +169,16 @@ migrate_docker_nat() { echo "Working on IPv6 NAT, please wait..." echo ${NAT_CONFIG} > /etc/docker/daemon.json ip6tables -F -t nat - if ! systemctl restart docker.service; then + [[ -e /etc/alpine-release ]] && rc-service docker restart || systemctl restart docker.service + if [[ $? -ne 0 ]]; then echo -e "\e[31mError:\e[0m Failed to activate IPv6 NAT! Reverting and exiting." rm /etc/docker/daemon.json - systemctl reset-failed docker.service - systemctl restart docker.service + if [[ -e /etc/alpine-release ]]; then + rc-service docker restart + else + systemctl reset-failed docker.service + systemctl restart docker.service + fi return 1 fi fi