radicale3: add better reload handling
authorDaniel F. Dickinson <dfdpublic@wildtechgarden.ca>
Thu, 15 Jan 2026 04:29:20 +0000 (23:29 -0500)
committerHannu Nyman <hannu.nyman@iki.fi>
Wed, 21 Jan 2026 05:42:10 +0000 (07:42 +0200)
We update the initscript to rebuild the radicale3 target configuration
file and then HUP the radicale3 process to reload it, on a reload
event, rather than the default which does not regenerate the target
configuration.

Signed-off-by: Daniel F. Dickinson <dfdpublic@wildtechgarden.ca>
net/radicale3/Makefile
net/radicale3/files/radicale3.init

index 8c1b66069200fad685ec62750ee251e00f8368f0..e95d08434a37cbe21b4b5338ffd1d127a76a67a8 100644 (file)
@@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=radicale3
 PKG_VERSION:=3.5.10
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_LICENSE:=GPL-3.0-or-later
 PKG_LICENSE_FILES:=COPYING.md
index d030160e5e5c0be7784ee66f63f9b5f048fdc3a6..a6b733d50cc67943278ab1540f6ab8342dace9f1 100755 (executable)
@@ -207,7 +207,7 @@ build_config() {
        rm -f "$tmpconf" "$tmpusers"
 }
 
-start_service() {
+prepare_config() {
        # If custom config (/etc/radicale3/config) absent, build it from UCI
        if [ ! -f /etc/radicale3/config ]; then
                build_config
@@ -221,6 +221,10 @@ start_service() {
                # We assume user handles directory creation if using manual config,
                # but we could attempt it if we parsed it. simpler to leave it for now.
        fi
+}
+
+start_service() {
+       prepare_config
 
        procd_open_instance
        procd_set_param command "$PROG" --config "$CFG_FILE"
@@ -232,8 +236,12 @@ start_service() {
 }
 
 reload_service() {
-       stop
-       start
+       prepare_config
+       if pgrep radicale3 >/dev/null 2>/dev/null; then
+               procd_send_signal radicale3 '*' HUP
+       else
+               start_service
+       fi
 }
 
 service_triggers() {