fix: precreate squid config before package install

This commit is contained in:
007hacky007
2026-04-14 15:01:00 +02:00
parent b36d1e08f2
commit d8161abc2e

View File

@@ -13,12 +13,8 @@ setting_up_container
network_check network_check
update_os update_os
msg_info "Installing Dependencies"
$STD apt install -y squid apache2-utils
msg_ok "Installed Dependencies"
msg_info "Configuring Squid" msg_info "Configuring Squid"
rm -f /etc/squid/conf.d/* mkdir -p /etc/squid
cat <<EOF >/etc/squid/squid.conf cat <<EOF >/etc/squid/squid.conf
acl localnet src 0.0.0.1-0.255.255.255 acl localnet src 0.0.0.1-0.255.255.255
acl localnet src 10.0.0.0/8 acl localnet src 10.0.0.0/8
@@ -70,6 +66,10 @@ request_header_access X-Forwarded-For deny all
EOF EOF
msg_ok "Configured Squid" msg_ok "Configured Squid"
msg_info "Installing Dependencies"
$STD apt install -y squid apache2-utils
msg_ok "Installed Dependencies"
msg_info "Preparing Authentication" msg_info "Preparing Authentication"
touch /etc/squid/passwords touch /etc/squid/passwords
chmod 600 /etc/squid/passwords chmod 600 /etc/squid/passwords
@@ -80,8 +80,7 @@ $STD squid -k parse
msg_ok "Validated Squid Configuration" msg_ok "Validated Squid Configuration"
msg_info "Starting Service" msg_info "Starting Service"
systemctl enable -q squid systemctl enable -q --now squid
systemctl restart squid
msg_ok "Started Service" msg_ok "Started Service"
motd_ssh motd_ssh