refactor: address MickLesk review feedback
Use literal 'Squid' in msg_* labels, add missing msg_ok and spacing in update_script. Replace install_packages_with_retry/enable_and_start_service/ safe_service_restart helpers with plain apt and systemctl commands. Merge auth setup and config validation into a single msg block. Drop the custom /etc/profile.d MOTD heredoc and trailing htpasswd echo.
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user