cleanup
This commit is contained in:
parent
37bd1b5b64
commit
e84fe547ad
@ -1,68 +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: CrazyWolf13
|
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
||||||
# Source: https://github.com/Lissy93/domain-locker
|
|
||||||
|
|
||||||
APP="Domain-Locker"
|
|
||||||
var_tags="${var_tags:-Monitoring}"
|
|
||||||
var_cpu="${var_cpu:-4}"
|
|
||||||
var_ram="${var_ram:-10240}"
|
|
||||||
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 [[ ! -d /opt/domain-locker ]]; then
|
|
||||||
msg_error "No ${APP} Installation Found!"
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
if check_for_gh_release "domain-locker" "Lissy93/domain-locker"; then
|
|
||||||
msg_info "Stopping Service"
|
|
||||||
systemctl stop domain-locker
|
|
||||||
msg_info "Service stopped"
|
|
||||||
|
|
||||||
PG_VERSION="17" setup_postgresql
|
|
||||||
setup_nodejs
|
|
||||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "domain-locker" "Lissy93/domain-locker"
|
|
||||||
|
|
||||||
msg_info "Installing Modules (patience)"
|
|
||||||
cd /opt/domain-locker
|
|
||||||
$STD npm install
|
|
||||||
msg_ok "Installed Modules"
|
|
||||||
|
|
||||||
msg_info "Building Domain-Locker (a lot of patience)"
|
|
||||||
npm install
|
|
||||||
set -a
|
|
||||||
source /opt/domain-locker.env
|
|
||||||
set +a
|
|
||||||
$STD npm run build
|
|
||||||
msg_info "Built Domain-Locker"
|
|
||||||
|
|
||||||
msg_info "Restarting Services"
|
|
||||||
systemctl start domain-locker
|
|
||||||
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}:3000${CL}"
|
|
||||||
@ -1,46 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
source <(curl -fsSL https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/build.func)
|
|
||||||
# Copyright (c) 2021-2025 community-scripts ORG
|
|
||||||
# Author: michelroegl-brunner
|
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
|
|
||||||
# Source: https://librenms.org
|
|
||||||
|
|
||||||
APP="Librenms"
|
|
||||||
var_tags="${var_tags:-monitoring}"
|
|
||||||
var_cpu="${var_cpu:-2}"
|
|
||||||
var_ram="${var_ram:-2048}"
|
|
||||||
var_disk="${var_disk:-4}"
|
|
||||||
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/librenms ]; then
|
|
||||||
msg_error "No ${APP} Installation Found!"
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
msg_info "Updating ${APP} Installation"
|
|
||||||
su librenms
|
|
||||||
cd /opt/librenms
|
|
||||||
./daily.sh
|
|
||||||
msg_ok "Updated ${APP} Installation"
|
|
||||||
|
|
||||||
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}"
|
|
||||||
73
ct/omada.sh
73
ct/omada.sh
@ -1,73 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func)
|
|
||||||
# Copyright (c) 2021-2025 tteck
|
|
||||||
# Author: tteck (tteckster)
|
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
||||||
# Source: https://www.tp-link.com/us/support/download/omada-software-controller/
|
|
||||||
|
|
||||||
APP="Omada"
|
|
||||||
var_tags="${var_tags:-tp-link;controller}"
|
|
||||||
var_cpu="${var_cpu:-2}"
|
|
||||||
var_ram="${var_ram:-3072}"
|
|
||||||
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 [[ ! -d /opt/tplink ]]; then
|
|
||||||
msg_error "No ${APP} Installation Found!"
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
msg_info "Updating MongoDB"
|
|
||||||
if lscpu | grep -q 'avx'; then
|
|
||||||
MONGO_VERSION="8.0" setup_mongodb
|
|
||||||
else
|
|
||||||
msg_warn "No AVX detected: Using older MongoDB 4.4"
|
|
||||||
MONGO_VERSION="4.4" setup_mongodb
|
|
||||||
fi
|
|
||||||
|
|
||||||
msg_info "Checking if right Azul Zulu Java is installed"
|
|
||||||
java_version=$(java -version 2>&1 | awk -F[\"_] '/version/ {print $2}')
|
|
||||||
if [[ "$java_version" =~ ^1\.8\.* ]]; then
|
|
||||||
$STD apt remove --purge -y zulu8-jdk
|
|
||||||
$STD apt -y install zulu21-jre-headless
|
|
||||||
msg_ok "Updated Azul Zulu Java to 21"
|
|
||||||
else
|
|
||||||
msg_ok "Azul Zulu Java 21 already installed"
|
|
||||||
fi
|
|
||||||
|
|
||||||
msg_info "Updating Omada Controller"
|
|
||||||
OMADA_URL=$(curl -fsSL "https://support.omadanetworks.com/en/download/software/omada-controller/" |
|
|
||||||
grep -o 'https://static\.tp-link\.com/upload/software/[^"]*linux_x64[^"]*\.deb' |
|
|
||||||
head -n1)
|
|
||||||
OMADA_PKG=$(basename "$OMADA_URL")
|
|
||||||
if [ -z "$OMADA_PKG" ]; then
|
|
||||||
msg_error "Could not retrieve Omada package – server may be down."
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
curl -fsSL "$OMADA_URL" -o "$OMADA_PKG"
|
|
||||||
export DEBIAN_FRONTEND=noninteractive
|
|
||||||
$STD dpkg -i "$OMADA_PKG"
|
|
||||||
rm -f "$OMADA_PKG"
|
|
||||||
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}https://${IP}:8043${CL}"
|
|
||||||
@ -1,45 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
source <(curl -fsSL https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/build.func)
|
|
||||||
# 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://www.passbolt.com/
|
|
||||||
|
|
||||||
APP="Passbolt"
|
|
||||||
var_tags="${var_tags:-auth}"
|
|
||||||
var_cpu="${var_cpu:-2}"
|
|
||||||
var_ram="${var_ram:-2048}"
|
|
||||||
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 /var ]]; then
|
|
||||||
msg_error "No ${APP} Installation Found!"
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
msg_info "Updating $APP LXC"
|
|
||||||
$STD apt update
|
|
||||||
$STD apt upgrade -y
|
|
||||||
msg_ok "Updated $APP LXC"
|
|
||||||
cleanup_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}${CL}"
|
|
||||||
@ -1,44 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "Domain Locker",
|
|
||||||
"slug": "domain-locker",
|
|
||||||
"categories": [
|
|
||||||
9
|
|
||||||
],
|
|
||||||
"date_created": "2025-11-10",
|
|
||||||
"type": "ct",
|
|
||||||
"updateable": true,
|
|
||||||
"privileged": false,
|
|
||||||
"interface_port": 3000,
|
|
||||||
"documentation": "https://domain-locker.com/about",
|
|
||||||
"config_path": "/opt/domain-locker.env",
|
|
||||||
"website": "https://github.com/Lissy93/domain-locker",
|
|
||||||
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/domain-locker.webp",
|
|
||||||
"description": "The all-in-one tool, for keeping track of your domain name portfolio. Got domain names? Get Domain Locker! ",
|
|
||||||
"install_methods": [
|
|
||||||
{
|
|
||||||
"type": "default",
|
|
||||||
"script": "ct/domain-locker.sh",
|
|
||||||
"resources": {
|
|
||||||
"cpu": 2,
|
|
||||||
"ram": 4096,
|
|
||||||
"hdd": 8,
|
|
||||||
"os": "Debian",
|
|
||||||
"version": "13"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"default_credentials": {
|
|
||||||
"username": null,
|
|
||||||
"password": null
|
|
||||||
},
|
|
||||||
"notes": [
|
|
||||||
{
|
|
||||||
"text": "Show DB credentials: `cat ~/Domain-Locker.creds`",
|
|
||||||
"type": "info"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"text": "Domain-locker takes quite some time to build and a lot of ressources, RAM and Cores can be lowered after install.",
|
|
||||||
"type": "info"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@ -1,35 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "LibreNMS",
|
|
||||||
"slug": "librenms",
|
|
||||||
"categories": [
|
|
||||||
9
|
|
||||||
],
|
|
||||||
"date_created": "2025-03-24",
|
|
||||||
"type": "ct",
|
|
||||||
"updateable": false,
|
|
||||||
"privileged": false,
|
|
||||||
"interface_port": 80,
|
|
||||||
"documentation": "https://docs.librenms.org/",
|
|
||||||
"website": "https://librenms.org/",
|
|
||||||
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/librenms.webp",
|
|
||||||
"config_path": "/opt/librenms/config.php and /opt/librenms/.env",
|
|
||||||
"description": "LibreNMS is an open-source, community-driven network monitoring system that provides automatic discovery, alerting, and performance tracking for network devices. It supports a wide range of hardware and integrates with various notification and logging platforms.",
|
|
||||||
"install_methods": [
|
|
||||||
{
|
|
||||||
"type": "default",
|
|
||||||
"script": "ct/librenms.sh",
|
|
||||||
"resources": {
|
|
||||||
"cpu": 2,
|
|
||||||
"ram": 2048,
|
|
||||||
"hdd": 4,
|
|
||||||
"os": "Debian",
|
|
||||||
"version": "12"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"default_credentials": {
|
|
||||||
"username": "admin",
|
|
||||||
"password": "admin"
|
|
||||||
},
|
|
||||||
"notes": []
|
|
||||||
}
|
|
||||||
@ -1,44 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "Passbolt",
|
|
||||||
"slug": "passbolt",
|
|
||||||
"categories": [
|
|
||||||
6
|
|
||||||
],
|
|
||||||
"date_created": "2025-09-04",
|
|
||||||
"type": "ct",
|
|
||||||
"updateable": true,
|
|
||||||
"privileged": false,
|
|
||||||
"interface_port": 443,
|
|
||||||
"documentation": "https://www.passbolt.com/docs/",
|
|
||||||
"config_path": "/etc/passbolt/passbolt.php",
|
|
||||||
"website": "https://www.passbolt.com/",
|
|
||||||
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/passbolt.webp",
|
|
||||||
"description": "Passbolt is a hybrid credential platform. It is built-first for modern IT teams, yet simple enough for everyone. A sovereign, battle-tested solution that delivers for a team of 5, or an organisation of 5000.",
|
|
||||||
"install_methods": [
|
|
||||||
{
|
|
||||||
"type": "default",
|
|
||||||
"script": "ct/passbolt.sh",
|
|
||||||
"resources": {
|
|
||||||
"cpu": 2,
|
|
||||||
"ram": 2048,
|
|
||||||
"hdd": 2,
|
|
||||||
"os": "Debian",
|
|
||||||
"version": "13"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"default_credentials": {
|
|
||||||
"username": null,
|
|
||||||
"password": null
|
|
||||||
},
|
|
||||||
"notes": [
|
|
||||||
{
|
|
||||||
"text": "Type `cat ~/.Passbolt.creds` to see MariaDB database credentials. You will need those to setup Passbolt.",
|
|
||||||
"type": "info"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"text": "The application uses self-signed certificates. You can also use Let's Encrypt to get a valid certificate for your domain. Please read the documentation for more information.",
|
|
||||||
"type": "info"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@ -1,72 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# Copyright (c) 2021-2025 community-scripts ORG
|
|
||||||
# Author: CrazyWolf13
|
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
|
|
||||||
# Source: https://github.com/CrazyWolf13/domain-locker
|
|
||||||
|
|
||||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
|
||||||
color
|
|
||||||
verb_ip6
|
|
||||||
catch_errors
|
|
||||||
setting_up_container
|
|
||||||
network_check
|
|
||||||
update_os
|
|
||||||
|
|
||||||
PG_VERSION="17" setup_postgresql
|
|
||||||
PG_DB_NAME="domainlocker" PG_DB_USER="domainlocker" setup_postgresql_db
|
|
||||||
NODE_VERSION="22" setup_nodejs
|
|
||||||
|
|
||||||
fetch_and_deploy_gh_release "domain-locker" "Lissy93/domain-locker"
|
|
||||||
|
|
||||||
msg_info "Installing Modules (patience)"
|
|
||||||
cd /opt/domain-locker
|
|
||||||
$STD npm install
|
|
||||||
msg_ok "Installed Modules"
|
|
||||||
|
|
||||||
msg_info "Building Domain-Locker (a lot of patience)"
|
|
||||||
cat <<EOF >/opt/domain-locker.env
|
|
||||||
# Database connection
|
|
||||||
DL_PG_HOST=localhost
|
|
||||||
DL_PG_PORT=5432
|
|
||||||
DL_PG_USER=$PG_DB_USER
|
|
||||||
DL_PG_PASSWORD=$PG_DB_PASS
|
|
||||||
DL_PG_NAME=$PG_DB_NAME
|
|
||||||
|
|
||||||
# Build + Runtime
|
|
||||||
DL_ENV_TYPE=selfHosted
|
|
||||||
NITRO_PRESET=node_server
|
|
||||||
NODE_ENV=production
|
|
||||||
EOF
|
|
||||||
set -a
|
|
||||||
source /opt/domain-locker.env
|
|
||||||
set +a
|
|
||||||
$STD npm run build
|
|
||||||
msg_info "Built Domain-Locker"
|
|
||||||
|
|
||||||
msg_info "Building Database schema"
|
|
||||||
export PGPASSWORD="$DL_PG_PASSWORD"
|
|
||||||
$STD psql -h "$DL_PG_HOST" -p "$DL_PG_PORT" -U "$DL_PG_USER" -d "$DL_PG_NAME" -f "/opt/domain-locker/db/schema.sql"
|
|
||||||
msg_ok "Built Database schema"
|
|
||||||
|
|
||||||
msg_info "Creating Service"
|
|
||||||
cat <<EOF >/etc/systemd/system/domain-locker.service
|
|
||||||
[Unit]
|
|
||||||
Description=Domain-Locker Service
|
|
||||||
After=network.target
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
EnvironmentFile=/opt/domain-locker.env
|
|
||||||
WorkingDirectory=/opt/domain-locker
|
|
||||||
ExecStart=/opt/domain-locker/start.sh
|
|
||||||
Restart=always
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=multi-user.target
|
|
||||||
EOF
|
|
||||||
systemctl start --now -q domain-locker
|
|
||||||
msg_info "Created Service"
|
|
||||||
|
|
||||||
motd_ssh
|
|
||||||
customize
|
|
||||||
cleanup_lxc
|
|
||||||
@ -1,147 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# Copyright (c) 2021-2025 community-scripts ORG
|
|
||||||
# Author: michelroegl-brunner
|
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
|
|
||||||
# Source: https://github.com/opf/openproject
|
|
||||||
|
|
||||||
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 \
|
|
||||||
acl \
|
|
||||||
fping \
|
|
||||||
graphviz \
|
|
||||||
imagemagick \
|
|
||||||
mtr-tiny \
|
|
||||||
nginx \
|
|
||||||
nmap \
|
|
||||||
rrdtool \
|
|
||||||
snmp \
|
|
||||||
snmpd \
|
|
||||||
whois
|
|
||||||
msg_ok "Installed Dependencies"
|
|
||||||
|
|
||||||
PHP_VERSION="8.4" PHP_FPM="YES" PHP_MODULE="gmp,mysql,snmp" setup_php
|
|
||||||
setup_mariadb
|
|
||||||
setup_composer
|
|
||||||
PYTHON_VERSION="3.13" setup_uv
|
|
||||||
|
|
||||||
msg_info "Installing Python Dependencies"
|
|
||||||
$STD apt install -y \
|
|
||||||
python3-dotenv \
|
|
||||||
python3-pymysql \
|
|
||||||
python3-redis \
|
|
||||||
python3-setuptools \
|
|
||||||
python3-systemd \
|
|
||||||
python3-pip
|
|
||||||
msg_ok "Installed Python Dependencies"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
MARIADB_DB_NAME="librenms" MARIADB_DB_USER="librenms" MARIADB_DB_PASS="$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13)" setup_mariadb_db
|
|
||||||
|
|
||||||
fetch_and_deploy_gh_release "librenms" "librenms/librenms"
|
|
||||||
|
|
||||||
msg_info "Configuring LibreNMS"
|
|
||||||
$STD useradd librenms -d /opt/librenms -M -r -s "$(which bash)"
|
|
||||||
mkdir -p /opt/librenms/{rrd,logs,bootstrap/cache,storage,html}
|
|
||||||
cd /opt/librenms
|
|
||||||
APP_KEY=$(openssl rand -base64 40 | tr -dc 'a-zA-Z0-9')
|
|
||||||
$STD uv venv .venv
|
|
||||||
$STD source .venv/bin/activate
|
|
||||||
$STD uv pip install -r requirements.txt
|
|
||||||
cat <<EOF >/opt/librenms/.env
|
|
||||||
DB_DATABASE=${MARIADB_DB_NAME}
|
|
||||||
DB_USERNAME=${MARIADB_DB_USER}
|
|
||||||
DB_PASSWORD=${MARIADB_DB_PASS}
|
|
||||||
APP_KEY=${APP_KEY}
|
|
||||||
EOF
|
|
||||||
chown -R librenms:librenms /opt/librenms
|
|
||||||
chmod 771 /opt/librenms
|
|
||||||
chmod -R ug=rwX /opt/librenms/bootstrap/cache /opt/librenms/storage /opt/librenms/logs /opt/librenms/rrd
|
|
||||||
msg_ok "Configured LibreNMS"
|
|
||||||
|
|
||||||
msg_info "Configure MariaDB"
|
|
||||||
sed -i "/\[mysqld\]/a innodb_file_per_table=1\nlower_case_table_names=0" /etc/mysql/mariadb.conf.d/50-server.cnf
|
|
||||||
systemctl enable -q --now mariadb
|
|
||||||
msg_ok "Configured MariaDB"
|
|
||||||
|
|
||||||
msg_info "Configure PHP-FPM"
|
|
||||||
cp /etc/php/8.4/fpm/pool.d/www.conf /etc/php/8.4/fpm/pool.d/librenms.conf
|
|
||||||
sed -i "s/\[www\]/\[librenms\]/g" /etc/php/8.4/fpm/pool.d/librenms.conf
|
|
||||||
sed -i "s/user = www-data/user = librenms/g" /etc/php/8.4/fpm/pool.d/librenms.conf
|
|
||||||
sed -i "s/group = www-data/group = librenms/g" /etc/php/8.4/fpm/pool.d/librenms.conf
|
|
||||||
sed -i "s/listen = \/run\/php\/php8.4-fpm.sock/listen = \/run\/php-fpm-librenms.sock/g" /etc/php/8.4/fpm/pool.d/librenms.conf
|
|
||||||
msg_ok "Configured PHP-FPM"
|
|
||||||
|
|
||||||
msg_info "Configure Nginx"
|
|
||||||
IP_ADDR=$(hostname -I | awk '{print $1}')
|
|
||||||
cat >/etc/nginx/sites-enabled/librenms <<'EOF'
|
|
||||||
server {
|
|
||||||
listen 80;
|
|
||||||
server_name ${IP_ADDR};
|
|
||||||
root /opt/librenms/html;
|
|
||||||
index index.php;
|
|
||||||
|
|
||||||
charset utf-8;
|
|
||||||
gzip on;
|
|
||||||
gzip_types text/css application/javascript text/javascript application/x-javascript image/svg+xml text/plain text/xsd text/xsl text/xml image/x-icon;
|
|
||||||
location / {
|
|
||||||
try_files $uri $uri/ /index.php?$query_string;
|
|
||||||
}
|
|
||||||
location ~ [^/]\.php(/|$) {
|
|
||||||
fastcgi_pass unix:/run/php-fpm-librenms.sock;
|
|
||||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
|
||||||
include fastcgi.conf;
|
|
||||||
}
|
|
||||||
location ~ /\.(?!well-known).* {
|
|
||||||
deny all;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
rm /etc/nginx/sites-enabled/default
|
|
||||||
$STD systemctl reload nginx
|
|
||||||
systemctl restart php8.4-fpm
|
|
||||||
msg_ok "Configured Nginx"
|
|
||||||
|
|
||||||
msg_info "Configure Services"
|
|
||||||
ln -s /opt/librenms/lnms /usr/bin/lnms
|
|
||||||
mkdir -p /etc/bash_completion.d/
|
|
||||||
cp /opt/librenms/misc/lnms-completion.bash /etc/bash_completion.d/
|
|
||||||
cp /opt/librenms/snmpd.conf.example /etc/snmp/snmpd.conf
|
|
||||||
|
|
||||||
$STD su - librenms -s /bin/bash -c "cd /opt/librenms && COMPOSER_ALLOW_SUPERUSER=1 composer install --no-dev"
|
|
||||||
$STD su - librenms -s /bin/bash -c "cd /opt/librenms && php8.4 artisan migrate --force"
|
|
||||||
$STD su - librenms -s /bin/bash -c "cd /opt/librenms && php8.4 artisan key:generate --force"
|
|
||||||
$STD su - librenms -s /bin/bash -c "cd /opt/librenms && lnms db:seed --force"
|
|
||||||
$STD su - librenms -s /bin/bash -c "cd /opt/librenms && lnms user:add -p admin -r admin admin"
|
|
||||||
|
|
||||||
|
|
||||||
RANDOM_STRING=$(openssl rand -base64 16 | tr -dc 'a-zA-Z0-9')
|
|
||||||
sed -i "s/RANDOMSTRINGHERE/$RANDOM_STRING/g" /etc/snmp/snmpd.conf
|
|
||||||
echo "SNMP Community String: $RANDOM_STRING" >>~/librenms.creds
|
|
||||||
curl -qso /usr/bin/distro https://raw.githubusercontent.com/librenms/librenms-agent/master/snmp/distro
|
|
||||||
chmod +x /usr/bin/distro
|
|
||||||
systemctl enable -q --now snmpd
|
|
||||||
|
|
||||||
cp /opt/librenms/dist/librenms.cron /etc/cron.d/librenms
|
|
||||||
cp /opt/librenms/dist/librenms-scheduler.service /opt/librenms/dist/librenms-scheduler.timer /etc/systemd/system/
|
|
||||||
|
|
||||||
systemctl enable -q --now librenms-scheduler.timer
|
|
||||||
cp /opt/librenms/misc/librenms.logrotate /etc/logrotate.d/librenms
|
|
||||||
msg_ok "Configured Services"
|
|
||||||
|
|
||||||
motd_ssh
|
|
||||||
customize
|
|
||||||
|
|
||||||
msg_info "Cleaning up"
|
|
||||||
$STD apt -y autoremove
|
|
||||||
$STD apt -y autoclean
|
|
||||||
msg_ok "Cleaned"
|
|
||||||
@ -1,53 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# Copyright (c) 2021-2025 tteck
|
|
||||||
# Author: tteck (tteckster)
|
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
||||||
# Source: https://www.tp-link.com/us/support/download/omada-software-controller/
|
|
||||||
|
|
||||||
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 jsvc
|
|
||||||
msg_ok "Installed Dependencies"
|
|
||||||
|
|
||||||
if lscpu | grep -q 'avx'; then
|
|
||||||
MONGO_VERSION="8.0" setup_mongodb
|
|
||||||
else
|
|
||||||
MONGO_VERSION="4.4" setup_mongodb
|
|
||||||
fi
|
|
||||||
|
|
||||||
JAVA_VERSION="21" setup_java
|
|
||||||
|
|
||||||
# if ! dpkg -l | grep -q 'libssl1.1'; then
|
|
||||||
# msg_info "Installing libssl (if needed)"
|
|
||||||
# curl -fsSL "https://security.debian.org/debian-security/pool/updates/main/o/openssl/libssl1.1_1.1.1w-0+deb11u4_amd64.deb" -o "/tmp/libssl.deb"
|
|
||||||
# $STD dpkg -i /tmp/libssl.deb
|
|
||||||
# rm -f /tmp/libssl.deb
|
|
||||||
# msg_ok "Installed libssl1.1"
|
|
||||||
# fi
|
|
||||||
|
|
||||||
msg_info "Installing Omada Controller"
|
|
||||||
OMADA_URL=$(curl -fsSL "https://support.omadanetworks.com/en/download/software/omada-controller/" |
|
|
||||||
grep -o 'https://static\.tp-link\.com/upload/software/[^"]*linux_x64[^"]*\.deb' |
|
|
||||||
head -n1)
|
|
||||||
OMADA_PKG=$(basename "$OMADA_URL")
|
|
||||||
curl -fsSL "$OMADA_URL" -o "$OMADA_PKG"
|
|
||||||
$STD dpkg -i "$OMADA_PKG"
|
|
||||||
msg_ok "Installed Omada Controller"
|
|
||||||
|
|
||||||
motd_ssh
|
|
||||||
customize
|
|
||||||
|
|
||||||
msg_info "Cleaning up"
|
|
||||||
rm -rf "$OMADA_PKG"
|
|
||||||
$STD apt -y autoremove
|
|
||||||
$STD apt -y autoclean
|
|
||||||
$STD apt -y clean
|
|
||||||
msg_ok "Cleaned"
|
|
||||||
@ -1,51 +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://www.passbolt.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 install -y \
|
|
||||||
apt-transport-https \
|
|
||||||
python3-certbot-nginx \
|
|
||||||
debconf-utils
|
|
||||||
msg_ok "Installed dependencies"
|
|
||||||
|
|
||||||
setup_mariadb
|
|
||||||
MARIADB_DB_NAME="passboltdb" MARIADB_DB_USER="passbolt" MARIADB_DB_PASS="$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13)" setup_mariadb_db
|
|
||||||
setup_deb822_repo \
|
|
||||||
"passbolt" \
|
|
||||||
"https://keys.openpgp.org/pks/lookup?op=get&options=mr&search=0x3D1A0346C8E1802F774AEF21DE8B853FC155581D" \
|
|
||||||
"https://download.passbolt.com/ce/debian" \
|
|
||||||
"buster" \
|
|
||||||
"stable"
|
|
||||||
create_self_signed_cert "passbolt"
|
|
||||||
|
|
||||||
msg_info "Setting up Passbolt (Patience)"
|
|
||||||
export DEBIAN_FRONTEND=noninteractive
|
|
||||||
IP_ADDR=$(hostname -I | awk '{print $1}')
|
|
||||||
echo passbolt-ce-server passbolt/mysql-configuration boolean true | debconf-set-selections
|
|
||||||
echo passbolt-ce-server passbolt/mysql-passbolt-username string $MARIADB_DB_USER | debconf-set-selections
|
|
||||||
echo passbolt-ce-server passbolt/mysql-passbolt-password password $MARIADB_DB_PASS | debconf-set-selections
|
|
||||||
echo passbolt-ce-server passbolt/mysql-passbolt-password-repeat password $MARIADB_DB_PASS | debconf-set-selections
|
|
||||||
echo passbolt-ce-server passbolt/mysql-passbolt-dbname string $MARIADB_DB_NAME | debconf-set-selections
|
|
||||||
echo passbolt-ce-server passbolt/nginx-configuration boolean true | debconf-set-selections
|
|
||||||
echo passbolt-ce-server passbolt/nginx-configuration-three-choices select manual | debconf-set-selections
|
|
||||||
echo passbolt-ce-server passbolt/nginx-domain string $IP_ADDR | debconf-set-selections
|
|
||||||
echo passbolt-ce-server passbolt/nginx-certificate-file string /etc/ssl/passbolt/passbolt.crt | debconf-set-selections
|
|
||||||
echo passbolt-ce-server passbolt/nginx-certificate-key-file string /etc/ssl/passbolt/passbolt.key | debconf-set-selections
|
|
||||||
$STD apt install -y --no-install-recommends passbolt-ce-server
|
|
||||||
msg_ok "Setup Passbolt"
|
|
||||||
|
|
||||||
motd_ssh
|
|
||||||
customize
|
|
||||||
cleanup_lxc
|
|
||||||
Loading…
x
Reference in New Issue
Block a user