Compare commits

...

10 Commits

Author SHA1 Message Date
CanbiZ
01a3921249 Refactor LibreNMS installation script
Updated the installation script for LibreNMS, changing the source URL and reorganizing the setup process for PHP, MariaDB, and Python dependencies. Removed cleanup commands and added a call to cleanup_lxc.
2025-11-14 16:20:31 +01:00
CanbiZ
d5d6622215 Fix application name to 'LibreNMS' 2025-11-14 16:19:00 +01:00
push-app-to-main[bot]
de166ff5f4 'Add new script' 2025-11-14 15:17:04 +00:00
community-scripts-pr-app[bot]
be383e941f Update versions.json (#9146)
Co-authored-by: GitHub Actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-11-14 13:05:58 +01:00
community-scripts-pr-app[bot]
8d6845d90b Update CHANGELOG.md (#9145)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-11-14 11:16:04 +00:00
CanbiZ
8f82229b29 Add CLEAN_INSTALL flag to fetch_and_deploy_gh_release (#9144) 2025-11-14 12:15:39 +01:00
community-scripts-pr-app[bot]
9710f32a16 Update CHANGELOG.md (#9139)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-11-14 00:13:22 +00:00
community-scripts-pr-app[bot]
fd5c07971a Update versions.json (#9138)
Co-authored-by: GitHub Actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-11-14 01:13:03 +01:00
community-scripts-pr-app[bot]
2ff9471d65 Update CHANGELOG.md (#9136)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-11-13 20:46:13 +00:00
Michel Roegl-Brunner
8edab22d32 Remove Barcodebuddy (#9135)
* Delete ct/barcode-buddy.sh

* Delete ct/headers/barcode-buddy

* Delete frontend/public/json/barcode-buddy.json

* Delete install/barcode-buddy-install.sh
2025-11-13 21:45:48 +01:00
11 changed files with 354 additions and 309 deletions

View File

@@ -10,6 +10,14 @@
> [!CAUTION]
Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit the project's popularity for potentially malicious purposes.
## 2025-11-14
### 🚀 Updated Scripts
- #### 🐞 Bug Fixes
- karakeep: clean install after every update [@MickLesk](https://github.com/MickLesk) ([#9144](https://github.com/community-scripts/ProxmoxVE/pull/9144))
## 2025-11-13
### 🆕 New Scripts
@@ -31,6 +39,7 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
- #### 💥 Breaking Changes
- Remove Barcodebuddy [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#9135](https://github.com/community-scripts/ProxmoxVE/pull/9135))
- Downgrade Swizzin to Debian 12 Bookworm [@MickLesk](https://github.com/MickLesk) ([#9116](https://github.com/community-scripts/ProxmoxVE/pull/9116))
## 2025-11-12

View File

@@ -1,69 +0,0 @@
#!/usr/bin/env bash
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
# Copyright (c) 2021-2025 community-scripts ORG
# Author: bvdberg01
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://github.com/Forceu/barcodebuddy
APP="Barcode-Buddy"
var_tags="${var_tags:-grocery;household}"
var_cpu="${var_cpu:-1}"
var_ram="${var_ram:-512}"
var_disk="${var_disk:-3}"
var_os="${var_os:-debian}"
var_version="${var_version:-12}"
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/barcodebuddy ]]; then
msg_error "No ${APP} Installation Found!"
exit
fi
if check_for_gh_release "barcodebuddy" "Forceu/barcodebuddy"; then
msg_info "Stopping Service"
systemctl stop apache2
systemctl stop barcodebuddy
msg_ok "Stopped Service"
msg_info "Backing up data"
mv /opt/barcodebuddy/ /opt/barcodebuddy-backup
msg_ok "Backed up data"
fetch_and_deploy_gh_release "barcodebuddy" "Forceu/barcodebuddy"
msg_info "Configuring ${APP}"
cp -r /opt/barcodebuddy-backup/data/. /opt/barcodebuddy/data
chown -R www-data:www-data /opt/barcodebuddy/data
msg_ok "Configured ${APP}"
msg_info "Starting Service"
systemctl start apache2
systemctl start barcodebuddy
msg_ok "Started Service"
msg_info "Cleaning up"
rm -r /opt/barcodebuddy-backup
msg_ok "Cleaned"
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,6 +0,0 @@
____ __ ____ __ __
/ __ )____ _______________ ____/ /__ / __ )__ ______/ /___/ /_ __
/ __ / __ `/ ___/ ___/ __ \/ __ / _ \______/ __ / / / / __ / __ / / / /
/ /_/ / /_/ / / / /__/ /_/ / /_/ / __/_____/ /_/ / /_/ / /_/ / /_/ / /_/ /
/_____/\__,_/_/ \___/\____/\__,_/\___/ /_____/\__,_/\__,_/\__,_/\__, /
/____/

6
ct/headers/librenms Normal file
View File

@@ -0,0 +1,6 @@
__ _ __
/ / (_) /_ ________ ____ ____ ___ _____
/ / / / __ \/ ___/ _ \/ __ \/ __ `__ \/ ___/
/ /___/ / /_/ / / / __/ / / / / / / / (__ )
/_____/_/_.___/_/ \___/_/ /_/_/ /_/ /_/____/

View File

@@ -55,7 +55,7 @@ function update_script() {
systemctl daemon-reload
fi
fetch_and_deploy_gh_release "karakeep" "karakeep-app/karakeep"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "karakeep" "karakeep-app/karakeep"
if command -v corepack >/dev/null; then
$STD corepack disable
fi

45
ct/librenms.sh Normal file
View File

@@ -0,0 +1,45 @@
#!/usr/bin/env bash
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
# Copyright (c) 2021-2025 community-scripts ORG
# Author: michelroegl-brunner
# License: MIT | https://github.com/community-scripts/ProxmoxVE/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 LibreNMS"
su librenms
cd /opt/librenms
./daily.sh
msg_ok "Updated LibreNMS"
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,40 +0,0 @@
{
"name": "Barcode Buddy",
"slug": "barcode-buddy",
"categories": [
24
],
"date_created": "2025-02-08",
"type": "ct",
"updateable": true,
"privileged": false,
"interface_port": 80,
"documentation": "https://barcodebuddy-documentation.readthedocs.io/en/latest/",
"website": "https://github.com/Forceu/barcodebuddy",
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/barcode-buddy.webp",
"config_path": "/opt/barcodebuddy/data/config.php",
"description": "Barcode Buddy for Grocy is an extension for Grocy, allowing to pass barcodes to Grocy. It supports barcodes for products and chores. If you own a physical barcode scanner, it can be integrated, so that all barcodes scanned are automatically pushed to BarcodeBuddy/Grocy.",
"install_methods": [
{
"type": "default",
"script": "ct/barcode-buddy.sh",
"resources": {
"cpu": 1,
"ram": 512,
"hdd": 3,
"os": "debian",
"version": "12"
}
}
],
"default_credentials": {
"username": null,
"password": null
},
"notes": [
{
"text": "After install enable the option \"Use Redis cache\" on the settings page.",
"type": "info"
}
]
}

View File

@@ -0,0 +1,35 @@
{
"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": []
}

View File

@@ -1,18 +1,133 @@
[
{
"name": "PrivateBin/PrivateBin",
"version": "1.7.9",
"date": "2025-11-13T10:26:37Z"
"name": "openobserve/openobserve",
"version": "v0.16.2",
"date": "2025-11-14T10:39:48Z"
},
{
"name": "karakeep-app/karakeep",
"version": "ios/v1.8.2-0",
"date": "2025-11-14T09:48:56Z"
},
{
"name": "zitadel/zitadel",
"version": "v4.7.0",
"date": "2025-11-14T09:45:13Z"
},
{
"name": "dgtlmoon/changedetection.io",
"version": "0.51.1",
"date": "2025-11-14T09:22:24Z"
},
{
"name": "nzbgetcom/nzbget",
"version": "v25.4",
"date": "2025-10-09T10:27:01Z"
},
{
"name": "verdaccio/verdaccio",
"version": "generator-verdaccio-plugin@6.0.0-next-8.25",
"date": "2025-11-14T08:14:55Z"
},
{
"name": "cloudreve/cloudreve",
"version": "4.10.0",
"date": "2025-11-14T07:57:36Z"
},
{
"name": "runtipi/runtipi",
"version": "v4.6.5",
"date": "2025-11-14T06:59:44Z"
},
{
"name": "morpheus65535/bazarr",
"version": "v1.5.3",
"date": "2025-09-20T12:12:33Z"
},
{
"name": "Jackett/Jackett",
"version": "v0.24.306",
"date": "2025-11-14T05:55:38Z"
},
{
"name": "chrisvel/tududi",
"version": "v0.86.1",
"date": "2025-11-14T05:05:44Z"
},
{
"name": "jeedom/core",
"version": "4.4.20",
"date": "2025-11-14T00:27:06Z"
},
{
"name": "steveiliop56/tinyauth",
"version": "v4.0.1",
"date": "2025-10-15T16:53:55Z"
},
{
"name": "rcourtman/Pulse",
"version": "v4.31.0",
"date": "2025-11-14T00:18:50Z"
},
{
"name": "chrisbenincasa/tunarr",
"version": "v0.22.14",
"date": "2025-11-13T23:16:04Z"
},
{
"name": "keycloak/keycloak",
"version": "26.4.5",
"date": "2025-11-12T15:24:23Z"
},
{
"name": "ollama/ollama",
"version": "v0.12.11",
"date": "2025-11-12T20:27:51Z"
},
{
"name": "gristlabs/grist-core",
"version": "v1.7.7",
"date": "2025-11-13T21:28:44Z"
},
{
"name": "0xERR0R/blocky",
"version": "v0.28.1",
"date": "2025-11-13T21:25:32Z"
},
{
"name": "pommee/goaway",
"version": "v0.62.18",
"date": "2025-11-13T19:49:21Z"
},
{
"name": "BerriAI/litellm",
"version": "v1.79.1-stable-patch-1",
"date": "2025-11-13T17:47:31Z"
},
{
"name": "fuma-nama/fumadocs",
"version": "fumadocs-openapi@10.0.6",
"date": "2025-11-13T16:37:11Z"
},
{
"name": "traefik/traefik",
"version": "v2.11.31",
"date": "2025-11-13T10:01:56Z"
"version": "v3.6.1",
"date": "2025-11-13T14:28:54Z"
},
{
"name": "emqx/emqx",
"version": "e5.9.2",
"date": "2025-11-13T14:24:59Z"
},
{
"name": "pocketbase/pocketbase",
"version": "v0.33.0",
"date": "2025-11-13T14:09:14Z"
},
{
"name": "PrivateBin/PrivateBin",
"version": "1.7.9",
"date": "2025-11-13T10:26:37Z"
},
{
"name": "meilisearch/meilisearch",
@@ -34,16 +149,6 @@
"version": "0.209.8",
"date": "2025-11-13T07:20:49Z"
},
{
"name": "fuma-nama/fumadocs",
"version": "create-fumadocs-app@16.0.14",
"date": "2025-11-13T06:36:08Z"
},
{
"name": "Jackett/Jackett",
"version": "v0.24.301",
"date": "2025-11-13T05:56:54Z"
},
{
"name": "firefly-iii/firefly-iii",
"version": "v6.4.8",
@@ -54,31 +159,11 @@
"version": "2025.10.5",
"date": "2025-11-12T01:09:44Z"
},
{
"name": "jeedom/core",
"version": "4.4.20",
"date": "2025-11-13T00:27:05Z"
},
{
"name": "steveiliop56/tinyauth",
"version": "v4.0.1",
"date": "2025-10-15T16:53:55Z"
},
{
"name": "documenso/documenso",
"version": "v2.0.11",
"date": "2025-11-12T23:56:58Z"
},
{
"name": "rcourtman/Pulse",
"version": "issue-706",
"date": "2025-11-12T21:52:39Z"
},
{
"name": "keycloak/keycloak",
"version": "26.4.5",
"date": "2025-11-12T15:24:23Z"
},
{
"name": "henrygd/beszel",
"version": "v0.16.0",
@@ -89,16 +174,6 @@
"version": "v2.13.4",
"date": "2025-11-12T21:27:04Z"
},
{
"name": "BerriAI/litellm",
"version": "v1.79.3.dev5",
"date": "2025-11-12T20:59:51Z"
},
{
"name": "ollama/ollama",
"version": "v0.12.11-rc0",
"date": "2025-11-12T16:40:38Z"
},
{
"name": "wazuh/wazuh",
"version": "v4.14.1",
@@ -109,11 +184,6 @@
"version": "v1.0.25",
"date": "2025-11-12T16:57:54Z"
},
{
"name": "zitadel/zitadel",
"version": "v4.6.6",
"date": "2025-11-12T13:09:12Z"
},
{
"name": "kimai/kimai",
"version": "2.42.0",
@@ -129,21 +199,11 @@
"version": "jenkins-2.528.2",
"date": "2025-11-12T13:18:13Z"
},
{
"name": "dgtlmoon/changedetection.io",
"version": "0.50.43",
"date": "2025-11-12T12:03:21Z"
},
{
"name": "cockpit-project/cockpit",
"version": "351",
"date": "2025-11-12T11:28:06Z"
},
{
"name": "0xERR0R/blocky",
"version": "v0.28.0",
"date": "2025-11-12T11:00:07Z"
},
{
"name": "Paymenter/Paymenter",
"version": "v1.4.4",
@@ -154,11 +214,6 @@
"version": "v0.101.0",
"date": "2025-11-12T07:13:22Z"
},
{
"name": "morpheus65535/bazarr",
"version": "v1.5.3",
"date": "2025-09-20T12:12:33Z"
},
{
"name": "webmin/webmin",
"version": "2.600",
@@ -189,11 +244,6 @@
"version": "v5.9.2",
"date": "2025-11-11T19:29:32Z"
},
{
"name": "runtipi/runtipi",
"version": "v4.6.4",
"date": "2025-11-11T17:47:15Z"
},
{
"name": "gethomepage/homepage",
"version": "v1.7.0",
@@ -224,11 +274,6 @@
"version": "1.1.0",
"date": "2025-11-11T14:30:28Z"
},
{
"name": "openobserve/openobserve",
"version": "v0.16.1",
"date": "2025-11-11T13:14:28Z"
},
{
"name": "BookStackApp/BookStack",
"version": "v25.11.1",
@@ -244,21 +289,11 @@
"version": "n8n@1.119.1",
"date": "2025-11-10T14:21:10Z"
},
{
"name": "emqx/emqx",
"version": "e6.0.1",
"date": "2025-11-11T09:46:06Z"
},
{
"name": "FlareSolverr/FlareSolverr",
"version": "v3.4.5",
"date": "2025-11-11T01:58:31Z"
},
{
"name": "chrisbenincasa/tunarr",
"version": "v0.23.0-alpha.22",
"date": "2025-11-11T01:36:48Z"
},
{
"name": "MediaBrowser/Emby.Releases",
"version": "4.9.1.90",
@@ -279,16 +314,6 @@
"version": "REL_13_23",
"date": "2025-11-10T21:59:18Z"
},
{
"name": "chrisvel/tududi",
"version": "v0.86",
"date": "2025-11-10T20:54:25Z"
},
{
"name": "pommee/goaway",
"version": "v0.62.17",
"date": "2025-11-10T19:45:49Z"
},
{
"name": "autobrr/autobrr",
"version": "v1.69.0",
@@ -334,11 +359,6 @@
"version": "v14.0.1",
"date": "2025-11-09T13:03:18Z"
},
{
"name": "karakeep-app/karakeep",
"version": "extension/v1.2.7",
"date": "2025-11-09T12:21:54Z"
},
{
"name": "authelia/authelia",
"version": "v4.39.14",
@@ -384,11 +404,6 @@
"version": "v7.13.0",
"date": "2025-11-08T13:36:25Z"
},
{
"name": "pocketbase/pocketbase",
"version": "v0.32.0",
"date": "2025-11-08T09:36:27Z"
},
{
"name": "home-assistant/core",
"version": "2025.11.1",
@@ -654,11 +669,6 @@
"version": "7.4.5",
"date": "2025-10-31T14:39:13Z"
},
{
"name": "gristlabs/grist-core",
"version": "v1.7.5",
"date": "2025-10-31T13:42:36Z"
},
{
"name": "plankanban/planka",
"version": "planka-1.1.1",
@@ -779,11 +789,6 @@
"version": "v2.1.5.5216",
"date": "2025-10-25T19:41:59Z"
},
{
"name": "verdaccio/verdaccio",
"version": "v6.2.1",
"date": "2025-10-24T15:40:49Z"
},
{
"name": "usememos/memos",
"version": "v0.25.2",
@@ -909,11 +914,6 @@
"version": "RELEASE.2025-10-15T17-29-55Z",
"date": "2025-10-16T19:33:51Z"
},
{
"name": "cloudreve/cloudreve",
"version": "4.9.2",
"date": "2025-10-16T03:24:44Z"
},
{
"name": "linkwarden/linkwarden",
"version": "v2.13.1",

View File

@@ -1,73 +0,0 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2025 community-scripts ORG
# Author: bvdberg01
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://github.com/Forceu/barcodebuddy
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 \
redis \
sqlite3
msg_ok "Installed Dependencies"
PHP_VERSION="8.2" PHP_APACHE="YES" PHP_MODULE="redis, sqlite3" setup_php
fetch_and_deploy_gh_release "barcodebuddy" "Forceu/barcodebuddy"
msg_info "Configuring barcodebuddy"
chown -R www-data:www-data /opt/barcodebuddy/data
msg_ok "Configured barcodebuddy"
msg_info "Creating Services"
cat <<EOF >/etc/systemd/system/barcodebuddy.service
[Unit]
Description=Run websocket server for barcodebuddy screen feature
After=network.target
[Service]
Type=simple
ExecStart=/usr/bin/php /opt/barcodebuddy/wsserver.php
StandardOutput=null
Restart=on-failure
User=www-data
[Install]
WantedBy=multi-user.target
EOF
cat <<EOF >/etc/apache2/sites-available/barcodebuddy.conf
<VirtualHost *:80>
ServerName barcodebuddy
DocumentRoot /opt/barcodebuddy
<Directory /opt/barcodebuddy>
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
ErrorLog /var/log/apache2/barcodebuddy_error.log
CustomLog /var/log/apache2/barcodebuddy_access.log combined
</VirtualHost>
EOF
systemctl enable -q --now barcodebuddy
$STD a2ensite barcodebuddy
$STD a2enmod rewrite
$STD a2dissite 000-default.conf
$STD systemctl reload apache2
msg_ok "Created Services"
motd_ssh
customize
msg_info "Cleaning up"
$STD apt-get -y autoremove
$STD apt-get -y autoclean
msg_ok "Cleaned"

138
install/librenms-install.sh Normal file
View File

@@ -0,0 +1,138 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2025 community-scripts ORG
# Author: michelroegl-brunner
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://www.librenms.org/
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"
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"
PHP_VERSION="8.4" PHP_FPM="YES" PHP_MODULE="gmp,mysql,snmp" setup_php
setup_mariadb
setup_composer
PYTHON_VERSION="3.13" setup_uv
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
cleanup_lxc