1
0
mirror of https://github.com/community-scripts/ProxmoxVE.git synced 2025-04-19 15:18:06 +00:00

CrowdSec: Update install URL and script refresh (#3604)

* Update install URL and script refresh

* Fine, have it your way
This commit is contained in:
Slaviša Arežina 2025-04-02 19:23:58 +02:00 committed by GitHub
parent b8ad603a75
commit 629b9df30a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -26,28 +26,28 @@ alias die='EXIT=$? LINE=$LINENO error_exit'
trap die ERR trap die ERR
function error_exit() { function error_exit() {
trap - ERR trap - ERR
local reason="Unknown failure occured." local reason="Unknown failure occured."
local msg="${1:-$reason}" local msg="${1:-$reason}"
local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE"
echo -e "$flag $msg" 1>&2 echo -e "$flag $msg" 1>&2
exit $EXIT exit "$EXIT"
} }
if command -v pveversion >/dev/null 2>&1; then if command -v pveversion >/dev/null 2>&1; then
echo -e "⚠️ Can't Install on Proxmox " echo -e "⚠️ Can't Install on Proxmox "
exit exit
fi fi
while true; do while true; do
read -p "This will Install ${APP} on $hostname. Proceed(y/n)?" yn read -p "This will Install ${APP} on $hostname. Proceed(y/n)?" yn
case $yn in case $yn in
[Yy]*) break ;; [Yy]*) break ;;
[Nn]*) exit ;; [Nn]*) exit ;;
*) echo "Please answer yes or no." ;; *) echo "Please answer yes or no." ;;
esac esac
done done
clear clear
function header_info { function header_info() {
echo -e "${BL} echo -e "${BL}
_____ _ _____ _____ _ _____
/ ____| | |/ ____| / ____| | |/ ____|
| | _ __ _____ ____| | (___ ___ ___ | | _ __ _____ ____| | (___ ___ ___
@ -60,20 +60,20 @@ ${CL}"
header_info header_info
function msg_info() { function msg_info() {
local msg="$1" local msg="$1"
echo -ne " ${HOLD} ${YW}${msg}..." echo -ne " ${HOLD} ${YW}${msg}..."
} }
function msg_ok() { function msg_ok() {
local msg="$1" local msg="$1"
echo -e "${BFR} ${CM} ${GN}${msg}${CL}" echo -e "${BFR} ${CM} ${GN}${msg}${CL}"
} }
msg_info "Setting up ${APP} Repository" msg_info "Setting up ${APP} Repository"
apt-get update &>/dev/null apt-get update &>/dev/null
apt-get install -y curl &>/dev/null apt-get install -y curl &>/dev/null
apt-get install -y gnupg &>/dev/null apt-get install -y gnupg &>/dev/null
curl -fsSL https://packagecloud.io/install/repositories/crowdsec/crowdsec/script.deb.sh | bash &>/dev/null curl -fsSL "https://install.crowdsec.net" | bash &>/dev/null
msg_ok "Setup ${APP} Repository" msg_ok "Setup ${APP} Repository"
msg_info "Installing ${APP}" msg_info "Installing ${APP}"