mirror of
https://github.com/openwrt/packages.git
synced 2026-02-04 12:06:29 +08:00
radicale3: add better reload handling
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>
This commit is contained in:
committed by
Hannu Nyman
parent
78cf89d7d3
commit
9e33952b60
@@ -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
|
||||
|
||||
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user