1
0
mirror of https://github.com/mailcow/mailcow-dockerized.git synced 2024-12-25 02:29:32 +02:00

Test for openrc configuration file instead of alpine

This way other distro using openrc can be supported.
This commit is contained in:
Luca Barbato 2024-01-22 09:50:24 +01:00
parent 76f8a5b7de
commit 25bdc4c9ed

View File

@ -116,11 +116,11 @@ migrate_docker_nat() {
echo "Working on IPv6 NAT, please wait..." echo "Working on IPv6 NAT, please wait..."
echo ${NAT_CONFIG} > /etc/docker/daemon.json echo ${NAT_CONFIG} > /etc/docker/daemon.json
ip6tables -F -t nat ip6tables -F -t nat
[[ -e /etc/alpine-release ]] && rc-service docker restart || systemctl restart docker.service [[ -e /etc/rc.conf ]] && rc-service docker restart || systemctl restart docker.service
if [[ $? -ne 0 ]]; then if [[ $? -ne 0 ]]; then
echo -e "\e[31mError:\e[0m Failed to activate IPv6 NAT! Reverting and exiting." echo -e "\e[31mError:\e[0m Failed to activate IPv6 NAT! Reverting and exiting."
rm /etc/docker/daemon.json rm /etc/docker/daemon.json
if [[ -e /etc/alpine-release ]]; then if [[ -e /etc/rc.conf ]]; then
rc-service docker restart rc-service docker restart
else else
systemctl reset-failed docker.service systemctl reset-failed docker.service