etesync-server: use relative path for static_url
authorPeter Stadler <peter.stadler@student.uibk.ac.at>
Sat, 17 Oct 2020 19:08:03 +0000 (21:08 +0200)
committerPeter Stadler <peter.stadler@student.uibk.ac.at>
Sat, 17 Oct 2020 19:29:44 +0000 (21:29 +0200)
Django 3.1 supports relative paths for static_url.
Use it to make it more flexible.
Minor fixes for upgrade:
* ignore-fail-on-non-empty for rmdir /usr/share/etesync-server/etesync_server
* do not stop service (it is stopped already and init file is removed)

Signed-off-by: Peter Stadler <peter.stadler@student.uibk.ac.at>
net/etesync-server/Makefile
net/etesync-server/files/81_setup-etesync-server
net/etesync-server/files/uci.cfg

index 0e05d375fae3e3eb8f25227ef177d55697c8bae5..ec4a13f57563dd182a2f05c8257b26aea3d7a657 100644 (file)
@@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=etesync-server
 PKG_VERSION:=0.3.0
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=etesync-server-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://github.com/etesync/server/archive/v$(PKG_VERSION)
@@ -88,7 +88,7 @@ Py3Package/etesync-server/filespec:=
 define Package/etesync-server/postrm
 #!/bin/sh
 [ -n "$${IPKG_INSTROOT}" ] && exit 0
-rmdir /usr/share/etesync-server/etesync_server
+rmdir --ignore-fail-on-non-empty /usr/share/etesync-server/etesync_server
 [ "$${PKG_UPGRADE}" = "1" ] && exit 0
 rm -r /www/etesync/static
 rmdir /www/etesync
index b2f6911a480e0935bdcf3e1fe137f94079a4e970..d693e1713c88561fff2a759c4109bc980ee2bccb 100644 (file)
@@ -1,7 +1,5 @@
 #!/bin/sh
 
-[ "${PKG_UPGRADE}" = "1" ] && /etc/init.d/etesync-server stop
-
 cd /usr/share/etesync-server || exit 1
 
 python3 manage.pyc migrate --noinput || exit 1
index 12fd0f610112427e37a451176ab1c258e8640dd1..66aaf227037288273b60928e72e03ca16ec03ad5 100644 (file)
@@ -1,6 +1,6 @@
 
 config django 'global'
-       option static_url '/etesync/static/' # TODO for django 3.1: "static/"
+       option static_url 'static/'
        option debug 'false'
 
 config django 'allowed_hosts'