try to run without root user
This commit is contained in:
parent
ce8cb9480b
commit
ca3ab201d2
@ -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= \
|
||||||
@ -29,7 +28,6 @@ RUN echo "deb-src http://deb.debian.org/debian bullseye main contrib" >> /etc/ap
|
|||||||
--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= \
|
||||||
@ -53,6 +51,8 @@ RUN echo "deb-src http://deb.debian.org/debian bullseye main contrib" >> /etc/ap
|
|||||||
--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
6
run.sh
@ -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
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user