diff --git a/CHANGELOG.md b/CHANGELOG.md index c5b95c8..6bb9f54 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ * enhance container shutdown on SIGTERM ([as requested with #264 by @buzz0r](https://github.com/buanet/ioBroker.docker/pull/264)) * enhance startup script logging * enhance logging for avahi & zwave install scripts -* add new env for offline_mode (fixes [#255](https://github.com/buanet/ioBroker.docker/issues/255)) +* add new env for offline mode (fixes [#255](https://github.com/buanet/ioBroker.docker/issues/255)) ### v6.1.0 (2022-03-01) * v6.1.0-beta.2 (2022-02-11) diff --git a/debian/scripts/iobroker_startup.sh b/debian/scripts/iobroker_startup.sh index b3194ed..a7c7002 100644 --- a/debian/scripts/iobroker_startup.sh +++ b/debian/scripts/iobroker_startup.sh @@ -247,10 +247,12 @@ fi if [ "$avahi" = "true" ] && [ "$offlinemode" = "true" ]; then echo 'Avahi-daemon is activated by ENV but offline mode is activated!' echo 'Skipping Avahi daemon setup.' -else +elif [ "$avahi" = "true" ]; then echo 'Avahi-daemon is activated by ENV.' + echo "Running setup script..." chmod 755 /opt/scripts/setup_avahi.sh bash /opt/scripts/setup_avahi.sh + echo 'Done.' echo ' ' fi @@ -258,24 +260,26 @@ fi if [ "$zwave" = "true" ] && [ "$offlinemode" = "true" ]; then echo 'Z-Wave is activated by ENV but offline mode is activated!' echo 'Skipping Z-Wave setup.' -else +elif [ "$zwave" = "true" ]; then echo "Z-Wave is activated by ENV." + echo "Running setup script..." chmod 755 /opt/scripts/setup_zwave.sh bash /opt/scripts/setup_zwave.sh + echo 'Done.' echo ' ' fi # checking ENV for USBDEVICES -if [ "$usbdevices" != "none" ]; then +if [ "$usbdevices" != "" ] && [ "$usbdevices" != "none" ]; then echo "Usb-device-support is activated by ENV." IFS=';' read -ra devicearray <<< "$usbdevices" for i in "${devicearray[@]}" do - echo -n "Setting permissions for" $i"... " - chown root:dialout $i - chmod g+rw $i + echo -n "Setting permissions for "$i"... " + chown root:dialout $i + chmod g+rw $i + echo 'Done.' done - echo 'Done.' echo ' ' fi diff --git a/debian/scripts/setup_avahi.sh b/debian/scripts/setup_avahi.sh index 660667d..03cb11f 100644 --- a/debian/scripts/setup_avahi.sh +++ b/debian/scripts/setup_avahi.sh @@ -2,17 +2,17 @@ if [ -e /usr/sbin/avahi-daemon ] && [ -e /var/run/dbus ] then - echo 'Avahi is already installed. Nothing to do here.' + echo '[setup_avahi.sh] Avahi is already installed. Nothing to do here.' else - echo -n 'Avahi-daemon is NOT installed. Going to install it now... ' + echo -n '[setup_avahi.sh] Avahi-daemon is NOT installed. Going to install it now... ' apt-get update > /opt/scripts/avahi_startup.log 2>&1 apt-get install -y libavahi-compat-libdnssd-dev avahi-daemon >> /opt/scripts/avahi_startup.log 2>&1 rm -rf /var/lib/apt/lists/* >> /opt/scripts/avahi_startup.log 2>&1 echo 'Done.' - echo -n 'Configuring avahi-daemon... ' + echo -n '[setup_avahi.sh] Configuring avahi-daemon... ' sed -i '/^rlimit-nproc/s/^\(.*\)/#\1/g' /etc/avahi/avahi-daemon.conf echo 'Done.' - echo -n 'Configuring dbus... ' + echo -n '[setup_avahi.sh] Configuring dbus... ' mkdir /var/run/dbus/ echo 'Done.' fi diff --git a/debian/scripts/setup_zwave.sh b/debian/scripts/setup_zwave.sh index 986f530..5cb49d9 100644 --- a/debian/scripts/setup_zwave.sh +++ b/debian/scripts/setup_zwave.sh @@ -2,9 +2,9 @@ if [ -e /usr/local/lib64 ] then - echo 'Openzwave is already installed. Nothing to do here.' + echo '[setup_zwave.sh] Openzwave is already installed. Nothing to do here.' else - echo -n 'Openzwave is NOT installed. Going to install it now... ' + echo -n '[setup_zwave.sh] Openzwave is NOT installed. Going to install it now... ' cd /opt curl -s -L -O http://old.openzwave.com/downloads/openzwave-1.6.1007.tar.gz tar -xf openzwave-1.6.1007.tar.gz && rm openzwave-1.6.1007.tar.gz