diff --git a/ct/squid.sh b/ct/squid.sh index 5a0eeb69..f48fe95c 100644 --- a/ct/squid.sh +++ b/ct/squid.sh @@ -27,17 +27,18 @@ function update_script() { msg_error "No ${APP} Installation Found!" exit fi - msg_info "Updating ${APP}" + msg_info "Updating Squid" $STD apt update $STD apt upgrade -y + msg_ok "Updated Squid" + msg_info "Validating Squid Configuration" $STD squid -k parse msg_ok "Validated Squid Configuration" + msg_info "Restarting Squid" - safe_service_restart "squid" + systemctl restart squid msg_ok "Restarted Squid" - msg_ok "Updated ${APP}" - msg_ok "Updated successfully!" exit } diff --git a/install/squid-install.sh b/install/squid-install.sh index 0d19afe8..aa011082 100644 --- a/install/squid-install.sh +++ b/install/squid-install.sh @@ -67,36 +67,22 @@ EOF msg_ok "Configured Squid" msg_info "Installing Dependencies" -install_packages_with_retry squid apache2-utils +$STD apt install -y \ + squid \ + apache2-utils msg_ok "Installed Dependencies" -msg_info "Preparing Authentication" +msg_info "Configuring Squid Authentication" touch /etc/squid/passwords chown proxy:proxy /etc/squid/passwords chmod 640 /etc/squid/passwords -msg_ok "Initialized Password File" - -msg_info "Validating Squid Configuration" $STD squid -k parse -msg_ok "Validated Squid Configuration" +msg_ok "Configured Squid Authentication" msg_info "Starting Service" -enable_and_start_service "squid" +systemctl enable -q --now squid msg_ok "Started Service" motd_ssh -cat <>/etc/profile.d/00_lxc-details.sh -echo "" -echo -e "${BOLD} Squid Proxy${CL}" -echo -e " Type: ${GN}HTTP Forward Proxy${CL}" -echo -e " Port: ${GN}3128${CL}" -echo "" -echo -e "${BOLD} Configure Authentication:${CL}" -echo -e " Add user: ${GN}htpasswd /etc/squid/passwords ${CL}" -EOF - -msg_info "Configure Proxy Authentication" -echo -e "${TAB}${BGN}Run inside the container: htpasswd /etc/squid/passwords ${CL}" - customize cleanup_lxc