From a20606b4911464e4c4a85cb3e2de9395aa24e5bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Nowak?= Date: Thu, 30 Jul 2026 23:19:10 +0200 Subject: [PATCH 1/4] AB-1318: replace anonymous trial with --email= flag The trial licence now needs an e-mail address (24h key immediately, the mailed code extends it to the full period), so install.sh takes --email=
and passes it to bolt-cli request-trial-license. Without the flag the install proceeds unlicensed with a hint to activate on the panel's License page. --- install.sh | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 1ac8113..b5611fa 100644 --- a/install.sh +++ b/install.sh @@ -12,6 +12,7 @@ # sudo ./install.sh # install latest bolt-panel from repo # sudo ./install.sh --version=1.0.0.beta3-v46.el9 # install specific bolt-panel version from repo # sudo ./install.sh --source=staging # use staging pulp repos (stable|staging|testing); default unchanged +# sudo ./install.sh --email=user@example.com # activate a 24h trial license for this e-mail (extended after e-mail verification) # set -e @@ -21,6 +22,8 @@ set -e PANEL_VERSION="" # Empty = current behavior (bolt-repo RPM from adminbolt). stable|staging|testing = pulp content path segment. BOLT_SOURCE="" +# E-mail for the trial license; empty = skip the trial request (activate manually on the License page). +ADMIN_EMAIL="" readonly WEB_INSTALL_ROOT="/usr/local/bolt/web" readonly POST_INSTALL_DB_PATH="/var/lib/adminbolt/db.sqlite3" @@ -239,7 +242,11 @@ stage_install_base_packages() { # ---------- Stage 3: Execute bolt-cli / Install services ---------- stage_configuration() { print_info "Stage 3: Executing bolt-cli / post-install actions" - run_or_fail "bolt-cli request-trial-license" "Request trial licence" + if [[ -n "$ADMIN_EMAIL" ]]; then + run_or_fail "bolt-cli request-trial-license --email=${ADMIN_EMAIL}" "Request trial licence" + else + print_info "No --email= provided; skipping trial licence request. Activate a licence later on the panel's License page." + fi run_or_fail "bolt-cli connect-bolt-agent-with-panel" "Connect bolt-agent to panel" run_or_warn "bolt-cli add-bolt-greeting-message" "Add bolt greeting message" run_or_warn "bolt-cli manage-nftable --action=install" "Nftable" @@ -287,10 +294,12 @@ stage_configuration() { # ---------- Main ---------- print_usage() { - echo "Usage: sudo $0 [--help] [--version=] [--source=]" + echo "Usage: sudo $0 [--help] [--version=] [--source=] [--email=
]" echo "AlmaLinux 9 / Rocky Linux 9. Stages: 1=ready check, 2=(2.1 settings, 2.2 prereq packages, 2.3 bolt packages), 3=post-install." echo "If --version is not provided, latest bolt-panel from repo is installed." echo "If --source is not provided, the bolt-repo RPM from adminbolt is used (default). Otherwise repos point at pulp content stable/staging/testing." + echo "If --email is provided, a 24h trial licence is activated for that address (the e-mailed code extends it to the full trial period)." + echo "Without --email the install proceeds unlicensed; activate on the panel's License page." } main() { @@ -306,9 +315,18 @@ main() { --source=*) BOLT_SOURCE="${arg#--source=}" ;; + --email=*) + ADMIN_EMAIL="${arg#--email=}" + ;; esac done + if [[ -n "$ADMIN_EMAIL" && ! "$ADMIN_EMAIL" =~ ^[^[:space:]@]+@[^[:space:]@]+\.[^[:space:]@]+$ ]]; then + print_error "Invalid --email=${ADMIN_EMAIL}" + print_usage + exit 1 + fi + if [[ -n "$BOLT_SOURCE" ]]; then case "$BOLT_SOURCE" in stable|staging|testing) ;; From 4ae8c1d64195390c65fd837eaa3b1607b44b6dad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Nowak?= Date: Thu, 6 Aug 2026 21:13:48 +0200 Subject: [PATCH 2/4] AB-1318: confirmation-link wording for the --email= trial flag The trial addon's v2 flow confirms the address with a link clicked on the WHMCS side; no code is entered anywhere. --- install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 7e47d3c..e267f92 100644 --- a/install.sh +++ b/install.sh @@ -12,7 +12,7 @@ # sudo ./install.sh # install latest bolt-panel from repo # sudo ./install.sh --version=1.0.0.beta3-v46.el9 # install specific bolt-panel version from repo # sudo ./install.sh --source=staging # use staging pulp repos (stable|staging|testing); default unchanged -# sudo ./install.sh --email=user@example.com # activate a 24h trial license for this e-mail (extended after e-mail verification) +# sudo ./install.sh --email=user@example.com # activate a 24h trial license for this e-mail (confirmation link extends it to 30 days) # set -e @@ -299,7 +299,7 @@ print_usage() { echo "AlmaLinux 9 / Rocky Linux 9. Stages: 1=ready check, 2=(2.1 settings, 2.2 prereq packages, 2.3 bolt packages), 3=post-install." echo "If --version is not provided, latest bolt-panel from repo is installed." echo "If --source is not provided, the bolt-repo RPM from adminbolt is used (default). Otherwise repos point at pulp content stable/staging/testing." - echo "If --email is provided, a 24h trial licence is activated for that address (the e-mailed code extends it to the full trial period)." + echo "If --email is provided, a 24h trial licence is activated for that address (clicking the e-mailed confirmation link extends it to the full trial period)." echo "Without --email the install proceeds unlicensed; activate on the panel's License page." } From fee062dfe79f50025730fa0089527f558a88bf1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Chodubski?= Date: Sat, 15 Aug 2026 13:37:47 +0200 Subject: [PATCH 3/4] AB-1322: queue post-install provisioning after cron setup --- install.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/install.sh b/install.sh index e267f92..c87b002 100644 --- a/install.sh +++ b/install.sh @@ -280,6 +280,8 @@ stage_configuration() { run_or_warn "bolt-cli manage-vsftpd-profiles --action=install" "Vsftpd profile" run_or_warn "bolt-cli manage-fail2ban-profiles --action=install" "Fail2Ban profile" run_or_warn "bolt-cli setup-cron-jobs" "Setup Cron jobs" + # Only records a provisioning plan and returns; the panel scheduler (installed by setup-cron-jobs) executes it in the background. + run_or_warn "bolt-cli post-install-provision" "Queue post-install provisioning (remaining PHP versions, SecureBox, SymLock)" run_or_warn "bolt-cli setup-hidepid" "Harden /proc (hidepid)" systemctl restart rspamd local SSO_URL=$(bolt-cli admin-sso-generate 2>/dev/null || echo "") From 6a3232c1fa4d05d7d2b17c1ce20219a75c6f9503 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Chodubski?= Date: Sat, 15 Aug 2026 16:32:54 +0200 Subject: [PATCH 4/4] AB-1322: request the trial at the end and never fail the install on it --- install.sh | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/install.sh b/install.sh index c87b002..405a310 100644 --- a/install.sh +++ b/install.sh @@ -242,11 +242,6 @@ stage_install_base_packages() { # ---------- Stage 3: Execute bolt-cli / Install services ---------- stage_configuration() { print_info "Stage 3: Executing bolt-cli / post-install actions" - if [[ -n "$ADMIN_EMAIL" ]]; then - run_or_fail "bolt-cli request-trial-license --email=${ADMIN_EMAIL}" "Request trial licence" - else - print_info "No --email= provided; skipping trial licence request. Activate a licence later on the panel's License page." - fi run_or_fail "bolt-cli connect-bolt-agent-with-panel" "Connect bolt-agent to panel" run_or_warn "bolt-cli add-bolt-greeting-message" "Add bolt greeting message" run_or_warn "bolt-cli manage-nftable --action=install" "Nftable" @@ -284,11 +279,21 @@ stage_configuration() { run_or_warn "bolt-cli post-install-provision" "Queue post-install provisioning (remaining PHP versions, SecureBox, SymLock)" run_or_warn "bolt-cli setup-hidepid" "Harden /proc (hidepid)" systemctl restart rspamd + # Trial licence last: nothing in the install depends on it, and the licence server refuses repeats + # per e-mail and per IP, which must never abort an otherwise complete installation. + local TRIAL_LICENCE_OK=0 + if [[ -n "$ADMIN_EMAIL" ]]; then + # run_or_warn evaluates the command in this shell, so the assignment records the outcome. + run_or_warn "bolt-cli request-trial-license --email=${ADMIN_EMAIL} && TRIAL_LICENCE_OK=1" "Request trial licence" + else + print_info "No --email= provided; skipping trial licence request. Activate a licence later on the panel's License page." + fi local SSO_URL=$(bolt-cli admin-sso-generate 2>/dev/null || echo "") [ -z "${SSO_URL}" ] && echo -e "${YELLOW}WARNING:${NC} SSO URL not generated" || print_success "SSO URL generated" echo -e "\n${BOLD}${GREEN}+----------------------------------------------------------+${NC}" echo -e "${BOLD}${GREEN}| Installation Completed Successfully |${NC}" echo -e "${BOLD}${GREEN}+----------------------------------------------------------+${NC}\n" + [ -n "${ADMIN_EMAIL}" ] && [ "${TRIAL_LICENCE_OK}" -eq 0 ] && echo -e "${YELLOW}NOTE:${NC} Trial licence not issued (request refused or licence server unreachable). The installation itself succeeded and the panel is usable; activate a licence on its License page.\n" [ -n "${SSO_URL:-}" ] && echo -e "${BOLD}${CYAN}--- Access ---${NC}\n${GREEN}Admin Panel:${NC}\n${BOLD}${SSO_URL}${NC}\n" echo -e "${GREEN}New SSO URL:${NC}\n${BOLD}bolt-cli admin-sso-generate${NC}" print_progress "100% — post-install" @@ -301,7 +306,7 @@ print_usage() { echo "AlmaLinux 9 / Rocky Linux 9. Stages: 1=ready check, 2=(2.1 settings, 2.2 prereq packages, 2.3 bolt packages), 3=post-install." echo "If --version is not provided, latest bolt-panel from repo is installed." echo "If --source is not provided, the bolt-repo RPM from adminbolt is used (default). Otherwise repos point at pulp content stable/staging/testing." - echo "If --email is provided, a 24h trial licence is activated for that address (clicking the e-mailed confirmation link extends it to the full trial period)." + echo "If --email is provided, a 24h trial licence is requested for that address at the very end of the install (clicking the e-mailed confirmation link extends it to the full trial period); the install completes even if the request is refused." echo "Without --email the install proceeds unlicensed; activate on the panel's License page." }