Enhance Piler and UniFi OS VM installation scripts

Added installation steps for Piler WebUI and improved config file handling in piler-install.sh. Updated unifi-os-server-vm.sh to always prompt for VMID, refactored machine type selection, improved storage validation, added swap file setup for stability, and increased VM IP detection attempts for reliability.
This commit is contained in:
CanbiZ
2026-01-14 17:17:04 +01:00
parent 916cc1c18b
commit b9aa3ec7ab
2 changed files with 39 additions and 18 deletions

View File

@@ -46,7 +46,10 @@ $STD systemctl stop manticore
$STD systemctl disable manticore
msg_ok "Installed Manticore Search"
msg_info "Installing Piler"
fetch_and_deploy_gh_release "piler" "jsuto/piler" "binary" "latest" "/tmp" "piler_*-noble-*_amd64.deb"
fetch_and_deploy_gh_release "piler-webui" "jsuto/piler" "binary" "latest" "/tmp" "piler-webui_*-noble-*_amd64.deb"
msg_ok "Installed Piler"
msg_info "Configuring Piler Database"
$STD mariadb -u root "${MARIADB_DB_NAME}" </usr/share/piler/db-mysql.sql 2>/dev/null || true
@@ -175,9 +178,9 @@ $STD systemctl restart php8.3-fpm
msg_ok "Configured PHP-FPM Pool"
msg_info "Configuring Piler Web GUI"
cd /var/www/piler
cat <<EOF >/var/www/piler/config-site.php
# Check if config-site.php already exists (created by .deb package)
if [ ! -f /var/www/piler/config-site.php ]; then
cat <<EOF >/var/www/piler/config-site.php
<?php
\$config['SITE_NAME'] = 'Piler Email Archive';
\$config['SITE_URL'] = 'http://${LOCAL_IP}';