Remove Domain Monitor, Miniflux, NetVisor, and Splunk scripts

Deleted installation and container scripts, as well as related JSON metadata, for Domain Monitor, Miniflux, NetVisor, and Splunk Enterprise. This removes support for these applications from the repository.
This commit is contained in:
CanbiZ 2025-11-13 15:36:40 +01:00
parent 9d5041e71b
commit 300d54a30b
12 changed files with 0 additions and 752 deletions

View File

@ -1,67 +0,0 @@
#!/usr/bin/env bash
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func)
# Copyright (c) 2021-2025 community-scripts ORG
# Author: Slaviša Arežina (tremor021)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://github.com/Hosteroid/domain-monitor
APP="Domain-Monitor"
var_tags="${var_tags:-proxy}"
var_cpu="${var_cpu:-2}"
var_ram="${var_ram:-512}"
var_disk="${var_disk:-2}"
var_os="${var_os:-debian}"
var_version="${var_version:-13}"
var_unprivileged="${var_unprivileged:-1}"
header_info "$APP"
variables
color
catch_errors
function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -d /opt/domain-monitor ]]; then
msg_error "No ${APP} Installation Found!"
exit
fi
if check_for_gh_release "domain-monitor" "Hosteroid/domain-monitor"; then
msg_info "Stopping Service"
systemctl stop apache2
msg_info "Service stopped"
msg_info "Creating backup"
mv /opt/domain-monitor/.env /opt
msg_ok "Created backup"
setup_composer
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "domain-monitor" "Hosteroid/domain-monitor" "prebuild" "latest" "/opt/domain-monitor" "domain-monitor-v*.zip"
msg_info "Updating Domain Monitor"
cd /opt/domain-monitor
$STD composer install
msg_ok "Updated Domain Monitor"
msg_info "Restoring backup"
mv /opt/.env /opt/domain-monitor
msg_ok "Restored backup"
msg_info "Restarting Services"
systemctl reload apache2
msg_ok "Restarted Services"
msg_ok "Updated successfully!"
fi
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}http://${IP}${CL}"

View File

@ -1,48 +0,0 @@
#!/usr/bin/env bash
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func)
# Copyright (c) 2021-2025 community-scripts ORG
# Author: omernaveedxyz
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://miniflux.app/
APP="Miniflux"
var_tags="${var_tags:-media}"
var_cpu="${var_cpu:-2}"
var_ram="${var_ram:-2048}"
var_disk="${var_disk:-8}"
var_os="${var_os:-debian}"
var_version="${var_version:-13}"
var_unprivileged="${var_unprivileged:-1}"
header_info "$APP"
variables
color
catch_errors
function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -f /etc/systemd/system/miniflux.service ]]; then
msg_error "No ${APP} Installation Found!"
exit
fi
msg_info "Updating ${APP} LXC"
$STD miniflux -flush-sessions -config-file /etc/miniflux.conf
$STD systemctl stop miniflux
fetch_and_deploy_gh_release "miniflux" "miniflux/v2" "binary" "latest"
$STD miniflux -migrate -config-file /etc/miniflux.conf
$STD systemctl start miniflux
msg_ok "Updated Successfully"
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}http://${IP}:8080${CL}"

View File

@ -1,80 +0,0 @@
#!/usr/bin/env bash
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func)
# Copyright (c) 2021-2025 community-scripts ORG
# Author: vhsdream
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://github.com/maynayza/netvisor
APP="NetVisor"
var_tags="${var_tags:-analytics}"
var_cpu="${var_cpu:-2}"
var_ram="${var_ram:-2048}"
var_disk="${var_disk:-6}"
var_os="${var_os:-debian}"
var_version="${var_version:-13}"
var_unprivileged="${var_unprivileged:-1}"
header_info "$APP"
variables
color
catch_errors
function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -d /opt/netvisor ]]; then
msg_error "No ${APP} Installation Found!"
exit
fi
if check_for_gh_release "netvisor" "mayanayza/netvisor"; then
msg_info "Stopping services"
systemctl stop netvisor-daemon netvisor-server
msg_ok "Stopped services"
msg_info "Backing up configurations"
cp /opt/netvisor/.env /opt/netvisor.env
msg_ok "Backed up configurations"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "netvisor" "mayanayza/netvisor" "tarball" "latest" "/opt/netvisor"
TOOLCHAIN="$(grep "channel" /opt/netvisor/backend/rust-toolchain.toml | awk -F\" '{print $2}')"
RUST_TOOLCHAIN=$TOOLCHAIN setup_rust
mv /opt/netvisor.env /opt/netvisor/.env
msg_info "Creating frontend UI"
export PUBLIC_SERVER_HOSTNAME=default
export PUBLIC_SERVER_PORT=60072
cd /opt/netvisor/ui
$STD npm ci --no-fund --no-audit
$STD npm run build
msg_ok "Created frontend UI"
msg_info "Building Netvisor-server (patience)"
cd /opt/netvisor/backend
$STD cargo build --release --bin server
mv ./target/release/server /usr/bin/netvisor-server
msg_ok "Built Netvisor-server"
msg_info "Building Netvisor-daemon (amd64 version)"
$STD cargo build --release --bin daemon
cp ./target/release/daemon /usr/bin/netvisor-daemon
msg_ok "Built Netvisor-daemon (amd64 version)"
msg_info "Starting services"
systemctl start netvisor-server netvisor-daemon
msg_ok "Updated successfully!"
fi
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}http://${IP}:60072${CL}"

View File

@ -1,41 +0,0 @@
#!/usr/bin/env bash
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func)
# Copyright (c) 2021-2025 community-scripts ORG
# Author: rcastley
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://www.splunk.com/en_us/download.html
APP="Splunk-Enterprise"
var_tags="${var_tags:-monitoring}"
var_cpu="${var_cpu:-4}"
var_ram="${var_ram:-8192}"
var_disk="${var_disk:-40}"
var_os="${var_os:-ubuntu}"
var_version="${var_version:-24.04}"
var_unprivileged="${var_unprivileged:-1}"
header_info "$APP"
variables
color
catch_errors
function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -d /opt/splunk ]]; then
msg_error "No ${APP} Installation Found!"
exit
fi
msg_error "Currently we don't provide an update function for this ${APP}."
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 the Splunk Enterprise Web interface using the following URL:${CL}"
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8000${CL}"

View File

@ -1,35 +0,0 @@
{
"name": "Domain Monitor",
"slug": "domain-monitor",
"categories": [
9
],
"date_created": "2025-09-04",
"type": "ct",
"updateable": true,
"privileged": false,
"interface_port": 80,
"documentation": "https://github.com/Hosteroid/domain-monitor/blob/main/README.md",
"config_path": "/opt/domain-monitor/.env",
"website": "https://github.com/Hosteroid/domain-monitor",
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/png/domain-monitor.png",
"description": "A self-hosted PHP domain expiration monitoring tool that tracks domain expiry dates, RDAP/WHOIS data, and SSL certificate validity. Supports alerts, multi-user setup, and cron automation. Built for developers, hosting providers, and IT admins who want full control without third-party services.",
"install_methods": [
{
"type": "default",
"script": "ct/domain-monitor.sh",
"resources": {
"cpu": 2,
"ram": 512,
"hdd": 2,
"os": "Debian",
"version": "13"
}
}
],
"default_credentials": {
"username": null,
"password": null
},
"notes": []
}

View File

@ -1,40 +0,0 @@
{
"name": "Miniflux",
"slug": "miniflux",
"categories": [
13
],
"date_created": "2025-09-24",
"type": "ct",
"updateable": true,
"privileged": false,
"config_path": "/etc/miniflux.conf",
"interface_port": 8080,
"documentation": "https://miniflux.app/docs/index.html",
"website": "https://miniflux.app/",
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/miniflux-light.webp",
"description": "Miniflux is a minimalist and opinionated feed reader.",
"install_methods": [
{
"type": "default",
"script": "ct/miniflux.sh",
"resources": {
"cpu": 2,
"ram": 2048,
"hdd": 8,
"os": "Debian",
"version": "13"
}
}
],
"default_credentials": {
"username": "admin",
"password": "randomly generated during installation process"
},
"notes": [
{
"text": "Admin password available as `ADMIN_PASSWORD` in `~/miniflux.creds`",
"type": "info"
}
]
}

View File

@ -1,40 +0,0 @@
{
"name": "NetVisor",
"slug": "netvisor",
"categories": [
9
],
"date_created": "2025-11-09",
"type": "ct",
"updateable": true,
"privileged": false,
"interface_port": 60072,
"documentation": "https://github.com/mayanayza/netvisor",
"config_path": "/opt/netvisor/.env",
"website": "https://github.com/mayanayza/netvisor",
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/png/netvisor.png",
"description": "Automatically discover and visually document network infrastructure",
"install_methods": [
{
"type": "default",
"script": "ct/netvisor.sh",
"resources": {
"cpu": 2,
"ram": 2048,
"hdd": 6,
"os": "Debian",
"version": "13"
}
}
],
"default_credentials": {
"username": null,
"password": null
},
"notes": [
{
"text": "The integrated daemon config is located at `/root/.config/daemon/config.json`",
"type": "info"
}
]
}

View File

@ -1,48 +0,0 @@
{
"name": "Splunk Enterprise",
"slug": "splunk-enterprise",
"categories": [
9
],
"date_created": "2025-11-06",
"type": "ct",
"updateable": false,
"privileged": false,
"interface_port": 8000,
"documentation": "https://help.splunk.com",
"config_path": "",
"website": "https://www.splunk.com/en_us/download/splunk-enterprise.html",
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/splunk.webp",
"description": "Platform for searching, monitoring, and analyzing machine-generated data at scale for operational intelligence and security.",
"install_methods": [
{
"type": "default",
"script": "ct/splunk-enterprise.sh",
"resources": {
"cpu": 4,
"ram": 8192,
"hdd": 40,
"os": "Ubuntu",
"version": "24.04"
}
}
],
"default_credentials": {
"username": null,
"password": null
},
"notes": [
{
"text": "The credentials to login can be found in splunk.creds.",
"type": "info"
},
{
"text": "Trial license allows indexing 500 MB/Day. After 60 days you can convert to a perpetual free license or purchase a Splunk Enterprise license to continue using the expanded functionality designed for enterprise-scale deployments.",
"type": "warning"
},
{
"text": "About Splunk Free License: https://help.splunk.com/en/splunk-enterprise/administer/admin-manual/10.0/configure-splunk-licenses/about-splunk-free",
"type": "info"
}
]
}

View File

@ -1,65 +0,0 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2025 community-scripts ORG
# Author: Slaviša Arežina (tremor021)
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
# Source: https://github.com/Hosteroid/domain-monitor
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
setting_up_container
network_check
update_os
msg_info "Installing Dependencies"
$STD apt install -y --no-install-recommends \
libicu-dev \
libzip-dev \
libpng-dev \
libjpeg62-turbo-dev \
libfreetype6-dev \
libxml2-dev \
libcurl4-openssl-dev \
libonig-dev \
pkg-config
msg_ok "Installed Dependencies"
PHP_VERSION="8.4" PHP_APACHE="YES" PHP_FPM="YES" PHP_MODULE="mysql" setup_php
setup_composer
setup_mariadb
MARIADB_DB_NAME="domain_monitor" MARIADB_DB_USER="domainmonitor" setup_mariadb_db
fetch_and_deploy_gh_release "domain-monitor" "Hosteroid/domain-monitor" "prebuild" "latest" "/opt/domain-monitor" "domain-monitor-v*.zip"
msg_info "Setting up Domain Monitor"
ENC_KEY=$(openssl rand -base64 48 | tr -dc 'A-Za-z0-9' | head -c 32)
cd /opt/domain-monitor
$STD composer install
cp env.example.txt .env
sed -i -e "s|^APP_ENV=.*|APP_ENV=production|" \
-e "s|^APP_ENCRYPTION_KEY=.*|APP_ENCRYPTION_KEY=$ENC_KEY|" \
-e "s|^SESSION_COOKIE_HTTPONLY=.*|SESSION_COOKIE_HTTPONLY=0|" \
-e "s|^DB_USERNAME=.*|DB_USERNAME=$MARIADB_DB_USER|" \
-e "s|^DB_PASSWORD=.*|DB_PASSWORD=$MARIADB_DB_PASS|" \
-e "s|^DB_DATABASE=.*|DB_DATABASE=$MARIADB_DB_NAME|" .env
cat <<EOF >/etc/apache2/sites-enabled/000-default.conf
<VirtualHost *:80>
ServerName domainmonitor.local
DocumentRoot "/opt/domain-monitor/public"
<Directory "/opt/domain-monitor/public">
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
EOF
chown -R www-data:www-data /opt/domain-monitor
$STD a2enmod rewrite headers
$STD systemctl reload apache2
msg_ok "Setup Domain Monitor"
motd_ssh
customize
cleanup_lxc

View File

@ -1,60 +0,0 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2025 community-scripts ORG
# Author: omernaveedxyz
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://miniflux.app/
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
setting_up_container
network_check
update_os
PG_VERSION=17 setup_postgresql
DB_NAME=miniflux
DB_USER=miniflux
DB_PASS="$(openssl rand -base64 18 | cut -c1-13)"
$STD sudo -u postgres psql -c "CREATE ROLE $DB_USER WITH LOGIN PASSWORD '$DB_PASS';"
$STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER;"
msg_ok "Set up PostgreSQL database"
fetch_and_deploy_gh_release "miniflux" "miniflux/v2" "binary" "latest"
msg_info "Configuring Miniflux"
ADMIN_NAME=admin
ADMIN_PASS="$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13)"
cat <<EOF >/etc/miniflux.conf
# See https://miniflux.app/docs/configuration.html
DATABASE_URL=user=$DB_USER password=$DB_PASS dbname=$DB_NAME sslmode=disable
CREATE_ADMIN=1
ADMIN_USERNAME=$ADMIN_NAME
ADMIN_PASSWORD=$ADMIN_PASS
LISTEN_ADDR=0.0.0.0:8080
EOF
{
echo "Application Credentials"
echo "DB_NAME: $DB_NAME"
echo "DB_USER: $DB_USER"
echo "DB_PASS: $DB_PASS"
echo "ADMIN_USERNAME: $ADMIN_NAME"
echo "ADMIN_PASSWORD: $ADMIN_PASS"
} >>~/miniflux.creds
$STD miniflux -migrate -config-file /etc/miniflux.conf
systemctl enable -q --now miniflux
msg_ok "Configured Miniflux"
motd_ssh
customize
msg_info "Cleaning up"
$STD apt -y autoremove
$STD apt -y autoclean
$STD apt -y clean
msg_ok "Cleaned"

View File

@ -1,149 +0,0 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2025 community-scripts ORG
# Author: vhsdream
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
# Source: https://github.com/mayanayza/netvisor
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
setting_up_container
network_check
update_os
msg_info "Installing Dependencies"
$STD apt install -y \
build-essential
msg_ok "Installed Dependencies"
PG_VERSION=17 setup_postgresql
NODE_VERSION="24" setup_nodejs
msg_info "Setting up PostgreSQL Database"
DB_NAME=netvisor_db
DB_USER=netvisor
DB_PASS="$(openssl rand -base64 18 | cut -c1-13)"
$STD sudo -u postgres psql -c "CREATE ROLE $DB_USER WITH LOGIN PASSWORD '$DB_PASS';"
$STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER ENCODING 'UTF8' TEMPLATE template0;"
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET client_encoding TO 'utf8';"
$STD sudo -u postgres psql -c "GRANT ALL PRIVILEGES ON DATABASE $DB_NAME to $DB_USER;"
{
echo "Netvisor-Credentials"
echo "Netvisor Database User: $DB_USER"
echo "Netvisor Database Password: $DB_PASS"
echo "Netvisor Database Name: $DB_NAME"
} >>~/netvisor.creds
msg_ok "Set up PostgreSQL Database"
fetch_and_deploy_gh_release "netvisor" "mayanayza/netvisor" "tarball" "latest" "/opt/netvisor"
TOOLCHAIN="$(grep "channel" /opt/netvisor/backend/rust-toolchain.toml | awk -F\" '{print $2}')"
RUST_TOOLCHAIN=$TOOLCHAIN setup_rust
msg_info "Creating frontend UI"
export PUBLIC_SERVER_HOSTNAME=default
export PUBLIC_SERVER_PORT=60072
cd /opt/netvisor/ui
$STD npm ci --no-fund --no-audit
$STD npm run build
msg_ok "Created frontend UI"
msg_info "Building Netvisor-server (patience)"
cd /opt/netvisor/backend
$STD cargo build --release --bin server
mv ./target/release/server /usr/bin/netvisor-server
msg_ok "Built Netvisor-server"
msg_info "Building Netvisor-daemon (amd64 version)"
$STD cargo build --release --bin daemon
cp ./target/release/daemon /usr/bin/netvisor-daemon
msg_ok "Built Netvisor-daemon (amd64 version)"
msg_info "Configuring server & daemon for first-run"
cat <<EOF >/opt/netvisor/.env
### - UI
PUBLIC_SERVER_HOSTNAME=default
## - comment out below when using reverse proxy
PUBLIC_SERVER_PORT=60072
### - SERVER
NETVISOR_DATABASE_URL=postgresql://$DB_USER:$DB_PASS@localhost:5432/$DB_NAME
NETVISOR_WEB_EXTERNAL_PATH="/opt/netvisor/ui/build"
NETVISOR_SERVER_PORT=60072
NETVISOR_LOG_LEVEL=info
NETVISOR_INTEGRATED_DAEMON_URL=http://127.0.0.1:60073
## - uncomment to disable signups
# NETVISOR_DISABLE_REGISTRATION=true
## - uncomment when behind reverse proxy
# NETVISOR_USE_SECURE_SESSION_COOKIES=true
### - OIDC (optional)
# NETVISOR_OIDC_ISSUER_URL=
# NETVISOR_OIDC_CLIENT_ID=
# NETVISOR_OIDC_CLIENT_SECRET=
# NETVISOR_OIDC_PROVIDER_NAME=
# NETVISOR_OIDC_REDIRECT_URL=
## - Callback URL for reference
# http://your-netvisor-domain:60072/api/auth/oidc/callback
### - INTEGRATED DAEMON
NETVISOR_SERVER_TARGET=127.0.0.1
NETVISOR_BIND_ADDRESS=0.0.0.0
NETVISOR_NAME="netvisor-daemon"
NETVISOR_HEARTBEAT_INTERVAL=30
EOF
cat <<EOF >/etc/systemd/system/netvisor-server.service
[Unit]
Description=NetVisor Network Discovery Server
After=network.target postgresql.service
[Service]
Type=simple
EnvironmentFile=/opt/netvisor/.env
ExecStart=/usr/bin/netvisor-server
Restart=always
RestartSec=10
StandardOutput=journal
StandardError=journal
[Install]
WantedBy=multi-user.target
EOF
systemctl -q enable --now netvisor-server
sleep 5
NETWORK_ID="$(sudo -u postgres psql -1 -t -d $DB_NAME -c 'SELECT id FROM networks;')"
API_KEY="$(sudo -u postgres psql -1 -t -d $DB_NAME -c 'SELECT key from api_keys;')"
cat <<EOF >/etc/systemd/system/netvisor-daemon.service
[Unit]
Description=NetVisor Network Discovery Daemon
After=network.target netvisor-server.service
[Service]
Type=simple
EnvironmentFile=/opt/netvisor/.env
ExecStart=/usr/bin/netvisor-daemon --server-target http://127.0.0.1 --server-port 60072 --network-id ${NETWORK_ID} --daemon-api-key ${API_KEY}
Restart=always
RestartSec=10
StandardOutput=journal
StandardError=journal
[Install]
WantedBy=multi-user.target
EOF
systemctl -q enable --now netvisor-daemon
msg_ok "Netvisor server & daemon configured and running"
motd_ssh
customize
msg_info "Cleaning up"
$STD apt-get -y autoremove
$STD apt-get -y autoclean
$STD apt -y clean
msg_ok "Cleaned"

View File

@ -1,79 +0,0 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2025 community-scripts ORG
# Author: rcastley
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://www.splunk.com/en_us/download.html
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
setting_up_container
network_check
update_os
echo -e "${TAB3}┌─────────────────────────────────────────────────────────────────────────┐"
echo -e "${TAB3}│ SPLUNK GENERAL TERMS │"
echo -e "${TAB3}└─────────────────────────────────────────────────────────────────────────┘"
echo ""
echo -e "${TAB3}Before proceeding with the Splunk Enterprise installation, you must"
echo -e "${TAB3}review and accept the Splunk General Terms."
echo ""
echo -e "${TAB3}Please review the terms at:"
echo -e "${TAB3}${GATEWAY}${BGN}https://www.splunk.com/en_us/legal/splunk-general-terms.html${CL}"
echo ""
while true; do
echo -e "${TAB3}Do you accept the Splunk General Terms? (y/N): \c"
read -r response
case $response in
[Yy]|[Yy][Ee][Ss])
msg_ok "Terms accepted. Proceeding with installation..."
break
;;
[Nn]|[Nn][Oo]|"")
msg_error "Terms not accepted. Installation cannot proceed."
msg_error "Please review the terms and run the script again if you wish to proceed."
exit 1
;;
*)
msg_error "Invalid response. Please enter 'y' for yes or 'n' for no."
;;
esac
done
msg_info "Setup Splunk Enterprise"
DOWNLOAD_URL=$(curl -s "https://www.splunk.com/en_us/download/splunk-enterprise.html" | grep -o 'data-link="[^"]*' | sed 's/data-link="//' | grep "https.*products/splunk/releases" | grep "\.deb$")
RELEASE=$(echo "$DOWNLOAD_URL" | sed 's|.*/releases/\([^/]*\)/.*|\1|')
$STD curl -fsSL -o "splunk-enterprise.deb" "$DOWNLOAD_URL" || {
msg_error "Failed to download Splunk Enterprise from the provided link."
exit 1
}
$STD dpkg -i "splunk-enterprise.deb"
rm -f "splunk-enterprise.deb"
msg_ok "Setup Splunk Enterprise v${RELEASE}"
msg_info "Creating Splunk admin user"
ADMIN_USER="admin"
ADMIN_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13)
{
echo "Splunk-Credentials"
echo "Username: $ADMIN_USER"
echo "Password: $ADMIN_PASS"
} >> ~/splunk.creds
cat > "/opt/splunk/etc/system/local/user-seed.conf" << EOF
[user_info]
USERNAME = $ADMIN_USER
PASSWORD = $ADMIN_PASS
EOF
msg_ok "Created Splunk admin user"
msg_info "Starting Service"
$STD /opt/splunk/bin/splunk start --accept-license --answer-yes --no-prompt
$STD /opt/splunk/bin/splunk enable boot-start
msg_ok "Started Service"
motd_ssh
customize
cleanup_lxc