Browse Source

domitcz: fix dzVents scripts

Domoticz 3.8153 introduced support for dzVents. Unfortunately this was
broken by the 902_add-scripts-path, which attempts to make Domoticz more
FHS-compliant instead of throwing everything under /opt/domoticz.

The problem is that dzVents scripts added via the webinterface will be
generated on the filesystem. With the 902_add-scripts-path patch,
Domoticz tried to write this to "scriptsdir/dzVents/generated_scripts".
As the scriptsdir contains scripts that come with upstream, and are not
meant to be changed, this defaults to /usr/share/domoticz/scripts, which
is not writeable, so Domoticz is unable to write the script to the
filesystem. What is worse is that this silently fails.

Fix this by moving the generated_scripts dir to
"userdatadir/generated_scripts". The userdatadir defaults to
/var/lib/domoticz, which is writeable.

Additionally, since this patch does more than just adding the scripts
path, rename it to something more appropriate.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
lilik-openwrt-22.03
Stijn Tintel 7 years ago
parent
commit
476dae33c7
4 changed files with 131 additions and 66 deletions
  1. +2
    -2
      utils/domoticz/Makefile
  2. +3
    -3
      utils/domoticz/files/domoticz.init
  3. +0
    -0
      utils/domoticz/patches/902_disable-libusb.patch
  4. +126
    -61
      utils/domoticz/patches/903_fhs.patch

+ 2
- 2
utils/domoticz/Makefile View File

@ -11,7 +11,7 @@ PKG_NAME:=domoticz
PKG_VERSION_MAJOR:=3 PKG_VERSION_MAJOR:=3
PKG_VERSION_PATCH:=8153 PKG_VERSION_PATCH:=8153
PKG_VERSION:=$(PKG_VERSION_MAJOR).$(PKG_VERSION_PATCH) PKG_VERSION:=$(PKG_VERSION_MAJOR).$(PKG_VERSION_PATCH)
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/domoticz/domoticz/archive/$(PKG_VERSION)/$(PKG_SOURCE) PKG_SOURCE_URL:=https://github.com/domoticz/domoticz/archive/$(PKG_VERSION)/$(PKG_SOURCE)
@ -72,7 +72,7 @@ define Build/Prepare
buienradar_rain_example.pl \ buienradar_rain_example.pl \
_domoticz_main* \ _domoticz_main* \
download_update.sh \ download_update.sh \
dzVents/{.gitignore,documentation,examples} \
dzVents/{.gitignore,documentation,examples,generated_scripts} \
dzVents/runtime/{integration-tests,misc/smoothing.xlsx,tests} \ dzVents/runtime/{integration-tests,misc/smoothing.xlsx,tests} \
logrotate/ \ logrotate/ \
lua_parsers/example* \ lua_parsers/example* \


+ 3
- 3
utils/domoticz/files/domoticz.init View File

@ -20,9 +20,9 @@ start_domoticz() {
[ -n "$loglevel" ] && procd_append_param command -loglevel "$loglevel" [ -n "$loglevel" ] && procd_append_param command -loglevel "$loglevel"
[ -n "$syslog" ] && procd_append_param command -syslog "$syslog" [ -n "$syslog" ] && procd_append_param command -syslog "$syslog"
[ -n "$userdata" ] && { [ -n "$userdata" ] && {
mkdir -p "$userdata"
chmod 0770 "$userdata"
chown domoticz:domoticz "$userdata"
mkdir -p "${userdata}/generated_scripts"
chmod -R 0770 "$userdata"
chown -R domoticz:domoticz "$userdata"
procd_append_param command -userdata "$userdata" procd_append_param command -userdata "$userdata"
} }
[ -n "$sslcert" -a "${sslwww:-0}" -gt 0 ] && { [ -n "$sslcert" -a "${sslwww:-0}" -gt 0 ] && {


utils/domoticz/patches/903_disable-libusb.patch → utils/domoticz/patches/902_disable-libusb.patch View File


utils/domoticz/patches/902_add-scripts-path.patch → utils/domoticz/patches/903_fhs.patch View File


Loading…
Cancel
Save