From b7edc32695a47ab1aa1d90b33e3d82f080253252 Mon Sep 17 00:00:00 2001 From: CyberMind-FR Date: Sun, 25 Jan 2026 14:40:46 +0100 Subject: [PATCH] fix: Add restart to services and fix wireguard qrcode module - haproxy: Add explicit restart_service function - tor-shield: Add explicit restart_service function - wireguard-dashboard/qrcode.js: Use baseclass.extend() pattern to fix "factory yields invalid constructor" error Co-Authored-By: Claude Opus 4.5 --- .../luci-static/resources/wireguard-dashboard/qrcode.js | 5 +++-- package/secubox/secubox-app-haproxy/files/etc/init.d/haproxy | 5 +++++ package/secubox/secubox-app-tor/files/etc/init.d/tor-shield | 5 +++++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/package/secubox/luci-app-wireguard-dashboard/htdocs/luci-static/resources/wireguard-dashboard/qrcode.js b/package/secubox/luci-app-wireguard-dashboard/htdocs/luci-static/resources/wireguard-dashboard/qrcode.js index 2a97d165..c70fbab2 100644 --- a/package/secubox/luci-app-wireguard-dashboard/htdocs/luci-static/resources/wireguard-dashboard/qrcode.js +++ b/package/secubox/luci-app-wireguard-dashboard/htdocs/luci-static/resources/wireguard-dashboard/qrcode.js @@ -1,4 +1,5 @@ 'use strict'; +'require baseclass'; /** * QR Code Generator for WireGuard Dashboard @@ -443,7 +444,7 @@ function generateSVG(text, displaySize) { } } -return { +return baseclass.extend({ /** * Generate QR code as SVG string * @param {string} text - Text to encode (up to ~300 bytes) @@ -488,4 +489,4 @@ return { getMaxCapacity: function() { return VERSION_CAPACITIES[20]; // 858 bytes } -}; +}); diff --git a/package/secubox/secubox-app-haproxy/files/etc/init.d/haproxy b/package/secubox/secubox-app-haproxy/files/etc/init.d/haproxy index 6bed2b38..aa137547 100644 --- a/package/secubox/secubox-app-haproxy/files/etc/init.d/haproxy +++ b/package/secubox/secubox-app-haproxy/files/etc/init.d/haproxy @@ -36,6 +36,11 @@ reload_service() { "$PROG" reload } +restart_service() { + stop + start +} + service_triggers() { procd_add_reload_trigger "haproxy" } diff --git a/package/secubox/secubox-app-tor/files/etc/init.d/tor-shield b/package/secubox/secubox-app-tor/files/etc/init.d/tor-shield index a7e112b0..3b3d4320 100644 --- a/package/secubox/secubox-app-tor/files/etc/init.d/tor-shield +++ b/package/secubox/secubox-app-tor/files/etc/init.d/tor-shield @@ -284,6 +284,11 @@ reload_service() { start } +restart_service() { + stop + start +} + status() { "$PROG" status }