mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-04-19 13:58:06 +00:00
'Add new script' (#3381)
Co-authored-by: push-app-to-main[bot] <203845782+push-app-to-main[bot]@users.noreply.github.com>
This commit is contained in:
parent
0be5f78d35
commit
e653157e24
44
ct/wazuh.sh
Normal file
44
ct/wazuh.sh
Normal file
@ -0,0 +1,44 @@
|
||||
#!/usr/bin/env bash
|
||||
source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
||||
# Copyright (c) 2025 community-scripts ORG
|
||||
# Author: Omar Minaya
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://wazuh.com/
|
||||
|
||||
APP="Wazuh"
|
||||
var_tags="security;monitoring"
|
||||
var_cpu="4"
|
||||
var_ram="4096"
|
||||
var_disk="18"
|
||||
var_os="debian"
|
||||
var_version="12"
|
||||
var_unprivileged="1"
|
||||
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
if [[ ! -d /var ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
msg_info "Updating ${APP} LXC"
|
||||
$STD apt-get update
|
||||
$STD apt-get -y upgrade
|
||||
msg_ok "Updated ${APP} LXC"
|
||||
exit
|
||||
}
|
||||
|
||||
start
|
||||
build_container
|
||||
description
|
||||
|
||||
msg_ok "Completed Successfully!\n"
|
||||
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
||||
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
|
||||
echo -e "${TAB}${GATEWAY}${BGN}https://${IP}:443${CL}"
|
43
frontend/public/json/wazuh.json
Normal file
43
frontend/public/json/wazuh.json
Normal file
@ -0,0 +1,43 @@
|
||||
{
|
||||
"name": "Wazuh",
|
||||
"slug": "wazuh",
|
||||
"categories": [
|
||||
1
|
||||
],
|
||||
"date_created": "2025-03-19",
|
||||
"type": "ct",
|
||||
"updateable": false,
|
||||
"privileged": false,
|
||||
"interface_port": 443,
|
||||
"documentation": "https://documentation.wazuh.com/",
|
||||
"website": "https://wazuh.com/",
|
||||
"logo": "https://avatars.githubusercontent.com/u/13752566?s=200&v=4",
|
||||
"description": "Wazuh is an open-source security monitoring solution that provides endpoint protection, network monitoring, and log analysis capabilities.",
|
||||
"install_methods": [
|
||||
{
|
||||
"type": "default",
|
||||
"script": "ct/wazuh.sh",
|
||||
"resources": {
|
||||
"cpu": 4,
|
||||
"ram": 4096,
|
||||
"hdd": 10,
|
||||
"os": "debian",
|
||||
"version": "12"
|
||||
}
|
||||
}
|
||||
],
|
||||
"default_credentials": {
|
||||
"username": "root",
|
||||
"password": null
|
||||
},
|
||||
"notes": [
|
||||
{
|
||||
"text": "WARNING: Installation sources scripts outside of Community Scripts repo. Please check the source before installing.",
|
||||
"type": "warning"
|
||||
},
|
||||
{
|
||||
"text": "Show password: `cat ~/wazuh.creds`",
|
||||
"type": "info"
|
||||
}
|
||||
]
|
||||
}
|
48
install/wazuh-install.sh
Normal file
48
install/wazuh-install.sh
Normal file
@ -0,0 +1,48 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2024 community-scripts ORG
|
||||
# Author: Omar Minaya
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://wazuh.com/
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
msg_info "Installing Dependencies"
|
||||
$STD apt-get install -y \
|
||||
sudo \
|
||||
mc \
|
||||
curl
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
# Fetching the latest Wazuh version
|
||||
msg_info "Fetching Latest Wazuh Version"
|
||||
RELEASE=$(curl -s https://api.github.com/repos/wazuh/wazuh/releases/latest | grep '"tag_name"' | awk -F '"' '{print substr($4, 2, length($2)-4)}')
|
||||
msg_ok "Latest Wazuh Version: $RELEASE"
|
||||
|
||||
msg_info "Setup Wazuh"
|
||||
curl -fsSL https://packages.wazuh.com/$RELEASE/wazuh-install.sh
|
||||
chmod +x wazuh-install.sh
|
||||
|
||||
if [ "$STD" = "silent" ]; then
|
||||
bash wazuh-install.sh -a >>~/wazuh-install.output
|
||||
else
|
||||
bash wazuh-install.sh -a | tee -a ~/wazuh-install.output
|
||||
fi
|
||||
cat ~/wazuh-install.output | grep -E "User|Password" | awk '{$1=$1};1' | sed '1i wazuh-credentials' >~/wazuh.creds
|
||||
msg_ok "Setup Wazuh"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
|
||||
msg_info "Cleaning up"
|
||||
rm -f wazuh-*.sh
|
||||
rm -f ~/wazuh-install.output
|
||||
$STD apt-get -y autoremove
|
||||
$STD apt-get -y autoclean
|
||||
msg_ok "Cleaned"
|
Loading…
x
Reference in New Issue
Block a user