try to run without root user

This commit is contained in:
fredbcode 2021-12-20 19:12:06 +01:00
parent ce8cb9480b
commit ca3ab201d2
2 changed files with 8 additions and 8 deletions

View File

@ -8,7 +8,6 @@ RUN echo "deb-src http://deb.debian.org/debian bullseye main contrib" >> /etc/ap
&& ./configure \ && ./configure \
--prefix=/usr \ --prefix=/usr \
--datadir=/usr/share/squid \ --datadir=/usr/share/squid \
--build=x86_64-linux-gnu \
--enable-cache-digests \ --enable-cache-digests \
--includedir=/usr/include \ --includedir=/usr/include \
--program-prefix= \ --program-prefix= \
@ -22,14 +21,13 @@ RUN echo "deb-src http://deb.debian.org/debian bullseye main contrib" >> /etc/ap
--enable-icap-support \ --enable-icap-support \
--enable-async-io \ --enable-async-io \
--with-pthreads \ --with-pthreads \
--with-winbind \ --with-winbind \
--bindir=/usr/sbin \ --bindir=/usr/sbin \
--sbindir=/usr/sbin \ --sbindir=/usr/sbin \
--with-squid=/usr/lib/squid \ --with-squid=/usr/lib/squid \
--disable-ipv6 \ --disable-ipv6 \
--enable-ltdl-convenience \ --enable-ltdl-convenience \
--enable-http-violations \ --enable-http-violations \
build_alias="x86_64-linux-gnu" \
CFLAGS="-g -O2 -g -Wall -O2" \ CFLAGS="-g -O2 -g -Wall -O2" \
LDFLAGS= \ LDFLAGS= \
CPPFLAGS= \ CPPFLAGS= \
@ -46,13 +44,15 @@ RUN echo "deb-src http://deb.debian.org/debian bullseye main contrib" >> /etc/ap
--enable-auth-digest="LDAP" \ --enable-auth-digest="LDAP" \
--enable-auth-ntlm \ --enable-auth-ntlm \
--enable-auth-negotiate \ --enable-auth-negotiate \
--enable-negotiate-auth-helpers \ --enable-negotiate-auth-helpers \
--with-krb5-config=yes \ --with-krb5-config=yes \
--enable-icap-client \ --enable-icap-client \
--sysconfdir=/etc/squid \ --sysconfdir=/etc/squid \
--with-filedescriptors=48000 \ --with-filedescriptors=48000 \
--enable-delay-pools \ --enable-delay-pools \
--with-large-files \ --with-large-files \
--with-pidfile=/tmp \
--with-default-user=squid \
--enable-removal-policies="lru,heap" \ --enable-removal-policies="lru,heap" \
&& make \ && make \
&& find /tmp/ -type f -name "Makefil*" -delete \ && find /tmp/ -type f -name "Makefil*" -delete \

6
run.sh
View File

@ -1,8 +1,8 @@
#!/bin/bash #!/bin/bash
if [ -e "/run/squid.pid" ];then if [ -e "/tmp/$HOSTNAME.pid" ];then
echo "Squid pid: Already running ?" echo "Squid pid: Already running ?"
rm /run/squid.pid rm /tmp/$HOSTNAME.pid
pkill squid pkill squid
exit 1 exit 1
fi fi
@ -17,7 +17,7 @@ else
touch "/var/spool/squid/$HOSTNAME" touch "/var/spool/squid/$HOSTNAME"
fi fi
while test -e /var/run/squid.pid while test -e /tmp/$HOSTNAME.pid
do do
echo "cache is generated/checked" echo "cache is generated/checked"
sleep 1 sleep 1