From 7566ffcfafb28096d672bca48e8525c8e7126eb3 Mon Sep 17 00:00:00 2001 From: fredbcode Date: Tue, 21 Dec 2021 09:14:41 +0100 Subject: [PATCH] try to run without root user --- Dockerfile | 2 +- run.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 367442c..b580ad1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -51,7 +51,7 @@ RUN echo "deb-src http://deb.debian.org/debian bullseye main contrib" >> /etc/ap --with-filedescriptors=48000 \ --enable-delay-pools \ --with-large-files \ - --with-pidfile=/tmp \ + --with-pidfile=/tmp/squid.pid \ --with-default-user=squid \ --enable-removal-policies="lru,heap" \ && make \ diff --git a/run.sh b/run.sh index 93115df..2b34214 100644 --- a/run.sh +++ b/run.sh @@ -1,8 +1,8 @@ #!/bin/bash -if [ -e "/tmp/$HOSTNAME.pid" ];then +if [ -e "/tmp/squid.pid" ];then echo "Squid pid: Already running ?" - rm /tmp/$HOSTNAME.pid + rm /tmp/squid.pid pkill squid exit 1 fi