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 <noreply@anthropic.com>
This commit is contained in:
CyberMind-FR 2026-01-25 14:40:46 +01:00
parent fed7bd43c1
commit b7edc32695
3 changed files with 13 additions and 2 deletions

View File

@ -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
}
};
});

View File

@ -36,6 +36,11 @@ reload_service() {
"$PROG" reload
}
restart_service() {
stop
start
}
service_triggers() {
procd_add_reload_trigger "haproxy"
}

View File

@ -284,6 +284,11 @@ reload_service() {
start
}
restart_service() {
stop
start
}
status() {
"$PROG" status
}