Browse Source

Merge pull request #2219 from chris5560/master

[Radicale] upstream to Radicale 1.1
Hannu Nyman 9 years ago
parent
commit
51533dd867

+ 3
- 3
net/radicale/Makefile View File

7
 include $(TOPDIR)/rules.mk
7
 include $(TOPDIR)/rules.mk
8
 
8
 
9
 PKG_NAME:=radicale
9
 PKG_NAME:=radicale
10
-PKG_VERSION:=0.10
11
-PKG_RELEASE:=2
10
+PKG_VERSION:=1.1
11
+PKG_RELEASE:=1
12
 PKG_MAINTAINER:=Christian Schoenebeck <christian.schoenebeck@gmail.com>
12
 PKG_MAINTAINER:=Christian Schoenebeck <christian.schoenebeck@gmail.com>
13
 
13
 
14
 PKG_LICENSE:=GPL-3.0
14
 PKG_LICENSE:=GPL-3.0
16
 
16
 
17
 PKG_SOURCE:=Radicale-$(PKG_VERSION).tar.gz
17
 PKG_SOURCE:=Radicale-$(PKG_VERSION).tar.gz
18
 PKG_SOURCE_URL:=http://pypi.python.org/packages/source/R/Radicale/
18
 PKG_SOURCE_URL:=http://pypi.python.org/packages/source/R/Radicale/
19
-PKG_MD5SUM:=32655d8893962956ead0ad690cca6044
19
+PKG_MD5SUM:=2e3f11d05d7a21ee412dfd7bd5c38961
20
 
20
 
21
 # needed for "r"adicale <-> "R"adicale
21
 # needed for "r"adicale <-> "R"adicale
22
 PKG_BUILD_DIR:=$(BUILD_DIR)/Radicale-$(PKG_VERSION)
22
 PKG_BUILD_DIR:=$(BUILD_DIR)/Radicale-$(PKG_VERSION)

+ 11
- 1
net/radicale/files/radicale.config View File

10
 # Each Radicale's config [section] is setup as UCI config setting 'section'
10
 # Each Radicale's config [section] is setup as UCI config setting 'section'
11
 #
11
 #
12
 
12
 
13
+####################################################
14
+# OpenWrt specific settings
15
+# not part of radicale package
16
+#
17
+config	system 'radicale'
18
+	# delayed startup at boot (default 10 seconds)
19
+	# to wait for netifd to bring up interfaces
20
+	# during this time iface hotplug events are ignored
21
+#	option	boot_delay	'10'
22
+
13
 ####################################################
23
 ####################################################
14
 # Server options
24
 # Server options
15
 #
25
 #
65
 ####################################################
75
 ####################################################
66
 # Authentication options
76
 # Authentication options
67
 #
77
 #
68
-config setting 'auth'
78
+config	setting	'auth'
69
 
79
 
70
 	# Authentication method
80
 	# Authentication method
71
 	# Value: None | htpasswd | IMAP | LDAP | PAM | courier | http | remote_user | custom
81
 	# Value: None | htpasswd | IMAP | LDAP | PAM | courier | http | remote_user | custom

+ 2
- 0
net/radicale/files/radicale.hotplug View File

2
 
2
 
3
 # only (re-)start on ifup
3
 # only (re-)start on ifup
4
 [ "$ACTION" = "ifup" ] || exit 0
4
 [ "$ACTION" = "ifup" ] || exit 0
5
+# only start if boot_delay is done
6
+[ -f /tmp/radicale.hotplug ] || exit 0
5
 
7
 
6
 _PID=$(ps | grep '[p]ython.*[r]adicale' 2>/dev/null | awk '{print $1}')
8
 _PID=$(ps | grep '[p]ython.*[r]adicale' 2>/dev/null | awk '{print $1}')
7
 kill -1 $_PID 2>/dev/null
9
 kill -1 $_PID 2>/dev/null

+ 17
- 1
net/radicale/files/radicale.init View File

163
 }
163
 }
164
 
164
 
165
 boot() {
165
 boot() {
166
-	return 0	# will be started by "iface" hotplug events
166
+	# wait a given time (default 10 seconds) before startup
167
+	# to wait for interfaces to come up / not using hotplug events during boot
168
+	_start() {
169
+		[ $1 -gt 0 ] && sleep $1
170
+		start
171
+	}
172
+
173
+	local _DELAY
174
+	_DELAY=$(uci_get "radicale" "system" "boot_delay" "10")
175
+	_start $_DELAY &
176
+	return 0
177
+}
178
+
179
+shutdown() {
180
+	rm -f /tmp/radicale.hotplug
181
+	stop
167
 }
182
 }
168
 
183
 
169
 start() {
184
 start() {
184
 	_set_permission
199
 	_set_permission
185
 
200
 
186
 	radicale --daemon --config=$SYSCFG
201
 	radicale --daemon --config=$SYSCFG
202
+	touch /tmp/radicale.hotplug
187
 
203
 
188
 	_running &	# check if running and syslog
204
 	_running &	# check if running and syslog
189
 
205