- Add publish_to_www RPCD method to publish static files to /www/blog - Add Build & Publish card in sync.js with configurable publish path - Add generate RPC call for building site - Fix file permissions for all RPCD scripts and init.d scripts - Bump luci-app-hexojs to 1.0.0-r3 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
47 lines
796 B
Bash
Executable File
47 lines
796 B
Bash
Executable File
#!/bin/sh /etc/rc.common
|
|
# SecuBox HAProxy Service
|
|
# Copyright (C) 2025 CyberMind.fr
|
|
|
|
START=90
|
|
STOP=10
|
|
USE_PROCD=1
|
|
|
|
NAME="haproxy"
|
|
PROG="/usr/sbin/haproxyctl"
|
|
|
|
start_service() {
|
|
local enabled
|
|
config_load haproxy
|
|
config_get enabled main enabled '0'
|
|
|
|
[ "$enabled" = "1" ] || return 0
|
|
|
|
# Sync ACME certificates to HAProxy format before starting
|
|
/usr/sbin/haproxy-sync-certs 2>/dev/null || true
|
|
|
|
procd_open_instance
|
|
procd_set_param command "$PROG" service-run
|
|
procd_set_param respawn 3600 5 0
|
|
procd_set_param stdout 1
|
|
procd_set_param stderr 1
|
|
procd_set_param pidfile /var/run/haproxy.pid
|
|
procd_close_instance
|
|
}
|
|
|
|
stop_service() {
|
|
"$PROG" service-stop
|
|
}
|
|
|
|
reload_service() {
|
|
"$PROG" reload
|
|
}
|
|
|
|
restart_service() {
|
|
stop
|
|
start
|
|
}
|
|
|
|
service_triggers() {
|
|
procd_add_reload_trigger "haproxy"
|
|
}
|