include $(TOPDIR)/rules.mk
PKG_NAME:=radicale
-PKG_VERSION:=0.10
-PKG_RELEASE:=2
+PKG_VERSION:=1.1
+PKG_RELEASE:=1
PKG_MAINTAINER:=Christian Schoenebeck <christian.schoenebeck@gmail.com>
PKG_LICENSE:=GPL-3.0
PKG_SOURCE:=Radicale-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://pypi.python.org/packages/source/R/Radicale/
-PKG_MD5SUM:=32655d8893962956ead0ad690cca6044
+PKG_MD5SUM:=2e3f11d05d7a21ee412dfd7bd5c38961
# needed for "r"adicale <-> "R"adicale
PKG_BUILD_DIR:=$(BUILD_DIR)/Radicale-$(PKG_VERSION)
# Each Radicale's config [section] is setup as UCI config setting 'section'
#
+####################################################
+# OpenWrt specific settings
+# not part of radicale package
+#
+config system 'radicale'
+ # delayed startup at boot (default 10 seconds)
+ # to wait for netifd to bring up interfaces
+ # during this time iface hotplug events are ignored
+# option boot_delay '10'
+
####################################################
# Server options
#
####################################################
# Authentication options
#
-config setting 'auth'
+config setting 'auth'
# Authentication method
# Value: None | htpasswd | IMAP | LDAP | PAM | courier | http | remote_user | custom
# only (re-)start on ifup
[ "$ACTION" = "ifup" ] || exit 0
+# only start if boot_delay is done
+[ -f /tmp/radicale.hotplug ] || exit 0
_PID=$(ps | grep '[p]ython.*[r]adicale' 2>/dev/null | awk '{print $1}')
kill -1 $_PID 2>/dev/null
}
boot() {
- return 0 # will be started by "iface" hotplug events
+ # wait a given time (default 10 seconds) before startup
+ # to wait for interfaces to come up / not using hotplug events during boot
+ _start() {
+ [ $1 -gt 0 ] && sleep $1
+ start
+ }
+
+ local _DELAY
+ _DELAY=$(uci_get "radicale" "system" "boot_delay" "10")
+ _start $_DELAY &
+ return 0
+}
+
+shutdown() {
+ rm -f /tmp/radicale.hotplug
+ stop
}
start() {
_set_permission
radicale --daemon --config=$SYSCFG
+ touch /tmp/radicale.hotplug
_running & # check if running and syslog