How to contribute to install.domoticz.com script?

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.

Moderators: leecollings, remb0

Post Reply
User avatar
MichaIng
Posts: 3
Joined: Sunday 08 March 2020 22:46
Target OS: -
Domoticz version:
Contact:

How to contribute to install.domoticz.com script?

Post by MichaIng »

Hi guys,

I want to contribute to the install script that is available via install.domoticz.com. I couldn't find its code on the GitHub repo, is it hosted somewhere, if so where?

Best regards,
MichaIng
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: How to contribute to install.domoticz.com script?

Post by waaren »

MichaIng wrote: Sunday 08 March 2020 22:49 I want to contribute to the install script that is available via install.domoticz.com. I couldn't find its code on the GitHub repo, is it hosted somewhere, if so where?
Contributions are more then welcome !
Developers and forum maintainers are members of this forum too.
Best is to share your contribution first here so we can have a look and comment.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
User avatar
MichaIng
Posts: 3
Joined: Sunday 08 March 2020 22:46
Target OS: -
Domoticz version:
Contact:

Re: How to contribute to install.domoticz.com script?

Post by MichaIng »

waaren wrote: Monday 09 March 2020 1:04Best is to share your contribution first here so we can have a look and comment.
Okay, it is all related to Debian/Raspbian.

On thing is the APT lists location:

Code: Select all

88	PKG_CACHE="/var/lib/apt/lists/"
While this is the default, it can be different and if this is already used and it's non-existence breaks the install, it should be checked in a failsafe way:

Code: Select all

PKG_CACHE=$(apt-config --format '%v' dump 'Dir::State::lists')
[[ $PKG_CACHE == '/'* ]] || PKG_CACHE="$(apt-config --format '%v%n' dump 'Dir::State' | sed -n 1p)/$PKG_CACHE"
[[ $PKG_CACHE == '/'* ]] || PKG_CACHE="$(apt-config --format '%v%n' dump 'Dir' | sed -n 1p)/$PKG_CACHE"
PKG_CACHE=${PKG_CACHE//\/\//\/}
Could be probably done more beautiful, especially double slash prevention, but at least this will work reliable ;).
The paths can be absolute or relative (without leading slash), in which case the parent path is used. Also note that the "cache" directory is a different one, where pkgcache.bin and srcpkgcache.bin are stored instead, while here the storage for original lists files is wanted.

Another thing is that at least when using HTTPS with the current pre-build downloads and installer, libssl1.0.0 is required, but it is not available anymore on Debian since Stretch: https://packages.debian.org/libssl1.0.0
It is possible to pull the package manually from the older repo or of course build it oneself, but it would be anyway good to use up-to-date libraries. Either a fresh libssl1.1 could be done, officially dropping oldoldstable Debian Jessie support, or at least the installer should check for this library or only Debian version and print a warning in case that libssl1.0.0 is required.

While there is already a systemd unit example present as preferred in the wiki, the installer still only installs a sysvinit service. Would be great to have either both or a choice or an automated choice based on [[ -d '/run/systemd/system' ]].

And yeah, I see little inconsistencies in bash coding, sometimes single square brackets, sometimes double square brackets, quotation where not required or double quotes where single quotes would be better, but this finally is a matter of taste and personal coding style as well since it does not particularly cause issues.
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: How to contribute to install.domoticz.com script?

Post by waaren »

MichaIng wrote: Monday 09 March 2020 18:15 Okay, it is all related to Debian/Raspbian.
Posted on Slack but no reaction yet. Now add it as issue on github
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
User avatar
MichaIng
Posts: 3
Joined: Sunday 08 March 2020 22:46
Target OS: -
Domoticz version:
Contact:

Re: How to contribute to install.domoticz.com script?

Post by MichaIng »

waaren wrote: Tuesday 10 March 2020 23:00 Posted on Slack but no reaction yet. Now add it as issue on github
Many thanks. Jep it would be easiest to have the installer in GitHub, where commits can be done easier, better reviewable and discussed.
User avatar
gizmocuz
Posts: 2552
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: How to contribute to install.domoticz.com script?

Post by gizmocuz »

I will make the install script available on GitHub.
The openssl dependency is maybe not needed when we make a new release, current users need to run the ./updatebeta script when they do a fresh install
Quality outlives Quantity!
User avatar
gizmocuz
Posts: 2552
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: How to contribute to install.domoticz.com script?

Post by gizmocuz »

Install script can now be found on Github inside the 'scripts' folder
Quality outlives Quantity!
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest