Skip to content

Commit e653157

Browse files
'Add new script' (#3381)
Co-authored-by: push-app-to-main[bot] <203845782+push-app-to-main[bot]@users.noreply.github.com>
1 parent 0be5f78 commit e653157

File tree

3 files changed

+135
-0
lines changed

3 files changed

+135
-0
lines changed

ct/wazuh.sh

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
#!/usr/bin/env bash
2+
source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
3+
# Copyright (c) 2025 community-scripts ORG
4+
# Author: Omar Minaya
5+
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
6+
# Source: https://wazuh.com/
7+
8+
APP="Wazuh"
9+
var_tags="security;monitoring"
10+
var_cpu="4"
11+
var_ram="4096"
12+
var_disk="18"
13+
var_os="debian"
14+
var_version="12"
15+
var_unprivileged="1"
16+
17+
header_info "$APP"
18+
variables
19+
color
20+
catch_errors
21+
22+
function update_script() {
23+
header_info
24+
check_container_storage
25+
check_container_resources
26+
if [[ ! -d /var ]]; then
27+
msg_error "No ${APP} Installation Found!"
28+
exit
29+
fi
30+
msg_info "Updating ${APP} LXC"
31+
$STD apt-get update
32+
$STD apt-get -y upgrade
33+
msg_ok "Updated ${APP} LXC"
34+
exit
35+
}
36+
37+
start
38+
build_container
39+
description
40+
41+
msg_ok "Completed Successfully!\n"
42+
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
43+
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
44+
echo -e "${TAB}${GATEWAY}${BGN}https://${IP}:443${CL}"

frontend/public/json/wazuh.json

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
{
2+
"name": "Wazuh",
3+
"slug": "wazuh",
4+
"categories": [
5+
1
6+
],
7+
"date_created": "2025-03-19",
8+
"type": "ct",
9+
"updateable": false,
10+
"privileged": false,
11+
"interface_port": 443,
12+
"documentation": "https://documentation.wazuh.com/",
13+
"website": "https://wazuh.com/",
14+
"logo": "https://avatars.githubusercontent.com/u/13752566?s=200&v=4",
15+
"description": "Wazuh is an open-source security monitoring solution that provides endpoint protection, network monitoring, and log analysis capabilities.",
16+
"install_methods": [
17+
{
18+
"type": "default",
19+
"script": "ct/wazuh.sh",
20+
"resources": {
21+
"cpu": 4,
22+
"ram": 4096,
23+
"hdd": 10,
24+
"os": "debian",
25+
"version": "12"
26+
}
27+
}
28+
],
29+
"default_credentials": {
30+
"username": "root",
31+
"password": null
32+
},
33+
"notes": [
34+
{
35+
"text": "WARNING: Installation sources scripts outside of Community Scripts repo. Please check the source before installing.",
36+
"type": "warning"
37+
},
38+
{
39+
"text": "Show password: `cat ~/wazuh.creds`",
40+
"type": "info"
41+
}
42+
]
43+
}

install/wazuh-install.sh

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
#!/usr/bin/env bash
2+
3+
# Copyright (c) 2024 community-scripts ORG
4+
# Author: Omar Minaya
5+
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
6+
# Source: https://wazuh.com/
7+
8+
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
9+
color
10+
verb_ip6
11+
catch_errors
12+
setting_up_container
13+
network_check
14+
update_os
15+
16+
msg_info "Installing Dependencies"
17+
$STD apt-get install -y \
18+
sudo \
19+
mc \
20+
curl
21+
msg_ok "Installed Dependencies"
22+
23+
# Fetching the latest Wazuh version
24+
msg_info "Fetching Latest Wazuh Version"
25+
RELEASE=$(curl -s https://api.github.com/repos/wazuh/wazuh/releases/latest | grep '"tag_name"' | awk -F '"' '{print substr($4, 2, length($2)-4)}')
26+
msg_ok "Latest Wazuh Version: $RELEASE"
27+
28+
msg_info "Setup Wazuh"
29+
curl -fsSL https://packages.wazuh.com/$RELEASE/wazuh-install.sh
30+
chmod +x wazuh-install.sh
31+
32+
if [ "$STD" = "silent" ]; then
33+
bash wazuh-install.sh -a >>~/wazuh-install.output
34+
else
35+
bash wazuh-install.sh -a | tee -a ~/wazuh-install.output
36+
fi
37+
cat ~/wazuh-install.output | grep -E "User|Password" | awk '{$1=$1};1' | sed '1i wazuh-credentials' >~/wazuh.creds
38+
msg_ok "Setup Wazuh"
39+
40+
motd_ssh
41+
customize
42+
43+
msg_info "Cleaning up"
44+
rm -f wazuh-*.sh
45+
rm -f ~/wazuh-install.output
46+
$STD apt-get -y autoremove
47+
$STD apt-get -y autoclean
48+
msg_ok "Cleaned"

0 commit comments

Comments
 (0)