Initial commit
This commit is contained in:
32
entrypoint.sh
Normal file
32
entrypoint.sh
Normal file
@@ -0,0 +1,32 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "=== Starting Squid SSL container ==="
|
||||
|
||||
# Create all necessary directories
|
||||
mkdir -p /var/cache/squid
|
||||
mkdir -p /var/log/squid
|
||||
mkdir -p /run/squid
|
||||
|
||||
# Set basic permissions
|
||||
chown -R proxy:proxy /var/cache/squid
|
||||
chown -R proxy:proxy /var/log/squid
|
||||
chown -R proxy:proxy /run/squid
|
||||
chown proxy:proxy /etc/squid/ssl/*
|
||||
|
||||
# Initialize SSL database
|
||||
/usr/local/bin/init-ssl.sh
|
||||
|
||||
# Initialize cache if needed
|
||||
if [ ! -d /var/cache/squid/00 ]; then
|
||||
echo "Initializing Squid cache..."
|
||||
squid -N -z
|
||||
echo "Cache initialized"
|
||||
fi
|
||||
|
||||
# Test Squid configuration
|
||||
echo "Testing Squid configuration..."
|
||||
squid -k parse
|
||||
|
||||
# Start Squid
|
||||
echo "Starting Squid..."
|
||||
exec squid -N -d 1
|
||||
Reference in New Issue
Block a user