diff --git a/flavors/squid_auto/squid_running_on_docker.sh b/flavors/squid_auto/squid_running_on_docker.sh index 013f77abd..3e804b57c 100644 --- a/flavors/squid_auto/squid_running_on_docker.sh +++ b/flavors/squid_auto/squid_running_on_docker.sh @@ -144,15 +144,15 @@ function set_boot_configuration(){ cat > /etc/squid_boot.sh < /dev/null 2>&1 ); -# then -# $(command -v docker) rm squid -# fi +if [ -f /var/run/squid/squid.pid ]; +then + rm /var/run/squid/squid.pid +fi + +if ( docker inspect squid -f '{{.State}}' > /dev/null 2>&1 ); +then + $(command -v docker) rm squid +fi # At this point docker is already up and we dont want to restore the firewall and wipte all # docker nat rules