[Radicale] upstream to Radicale 1.1
* upstream to Radicale 1.1 * new "boot_delay" option (default 10 seconds) to wait for interfaces to come up before hotplug restarts are enabled. Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>
This commit is contained in:
parent
754c1e2d90
commit
d2e9224965
4 changed files with 33 additions and 5 deletions
|
@ -7,8 +7,8 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=radicale
|
PKG_NAME:=radicale
|
||||||
PKG_VERSION:=0.10
|
PKG_VERSION:=1.1
|
||||||
PKG_RELEASE:=2
|
PKG_RELEASE:=1
|
||||||
PKG_MAINTAINER:=Christian Schoenebeck <christian.schoenebeck@gmail.com>
|
PKG_MAINTAINER:=Christian Schoenebeck <christian.schoenebeck@gmail.com>
|
||||||
|
|
||||||
PKG_LICENSE:=GPL-3.0
|
PKG_LICENSE:=GPL-3.0
|
||||||
|
@ -16,7 +16,7 @@ PKG_LICENSE_FILES:=COPYING
|
||||||
|
|
||||||
PKG_SOURCE:=Radicale-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=Radicale-$(PKG_VERSION).tar.gz
|
||||||
PKG_SOURCE_URL:=http://pypi.python.org/packages/source/R/Radicale/
|
PKG_SOURCE_URL:=http://pypi.python.org/packages/source/R/Radicale/
|
||||||
PKG_MD5SUM:=32655d8893962956ead0ad690cca6044
|
PKG_MD5SUM:=2e3f11d05d7a21ee412dfd7bd5c38961
|
||||||
|
|
||||||
# needed for "r"adicale <-> "R"adicale
|
# needed for "r"adicale <-> "R"adicale
|
||||||
PKG_BUILD_DIR:=$(BUILD_DIR)/Radicale-$(PKG_VERSION)
|
PKG_BUILD_DIR:=$(BUILD_DIR)/Radicale-$(PKG_VERSION)
|
||||||
|
|
|
@ -10,6 +10,16 @@
|
||||||
# Each Radicale's config [section] is setup as UCI config setting 'section'
|
# 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
|
# Server options
|
||||||
#
|
#
|
||||||
|
@ -65,7 +75,7 @@ config setting 'encoding'
|
||||||
####################################################
|
####################################################
|
||||||
# Authentication options
|
# Authentication options
|
||||||
#
|
#
|
||||||
config setting 'auth'
|
config setting 'auth'
|
||||||
|
|
||||||
# Authentication method
|
# Authentication method
|
||||||
# Value: None | htpasswd | IMAP | LDAP | PAM | courier | http | remote_user | custom
|
# Value: None | htpasswd | IMAP | LDAP | PAM | courier | http | remote_user | custom
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
|
|
||||||
# only (re-)start on ifup
|
# only (re-)start on ifup
|
||||||
[ "$ACTION" = "ifup" ] || exit 0
|
[ "$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}')
|
_PID=$(ps | grep '[p]ython.*[r]adicale' 2>/dev/null | awk '{print $1}')
|
||||||
kill -1 $_PID 2>/dev/null
|
kill -1 $_PID 2>/dev/null
|
||||||
|
|
|
@ -163,7 +163,22 @@ _set_permission() {
|
||||||
}
|
}
|
||||||
|
|
||||||
boot() {
|
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() {
|
start() {
|
||||||
|
@ -184,6 +199,7 @@ start() {
|
||||||
_set_permission
|
_set_permission
|
||||||
|
|
||||||
radicale --daemon --config=$SYSCFG
|
radicale --daemon --config=$SYSCFG
|
||||||
|
touch /tmp/radicale.hotplug
|
||||||
|
|
||||||
_running & # check if running and syslog
|
_running & # check if running and syslog
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue