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>
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
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
# 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"
}
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() {