diff --git a/CHANGELOG.md b/CHANGELOG.md index fa6508b..a3e8a58 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ * rewrite maintenance script ([#243 by @agross](https://github.com/buanet/ioBroker.docker/pull/243)) * 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 ### v6.1.0 (2022-03-01) * v6.1.0-beta.2 (2022-02-11) diff --git a/LICENSE.md b/LICENSE.md index c1ade89..f0db1d6 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2017-2021 André Germann +Copyright (c) 2017-2022 André Germann Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 83bc1b6..e3923e2 100644 --- a/README.md +++ b/README.md @@ -77,7 +77,7 @@ Moved to [CHANGELOG.md](CHANGELOG.md). MIT License -Copyright (c) 2017-2021 André Germann +Copyright (c) 2017-2022 André Germann Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/debian/scripts/iobroker_startup.sh b/debian/scripts/iobroker_startup.sh index 197d385..3bd9f67 100644 --- a/debian/scripts/iobroker_startup.sh +++ b/debian/scripts/iobroker_startup.sh @@ -86,7 +86,7 @@ then bash /opt/scripts/setup_packages.sh -update echo "Done." echo ' ' - echo "Registering maintenance script as command..." + echo -n "Registering maintenance script as command... " echo "alias maintenance=\'/opt/scripts/maintenance.sh\'" >> /root/.bashrc echo "alias maint=\'/opt/scripts/maintenance.sh\'" >> /root/.bashrc echo "alias m=\'/opt/scripts/maintenance.sh\'" >> /root/.bashrc @@ -240,7 +240,6 @@ then echo "Avahi-daemon is activated by ENV." chmod 755 /opt/scripts/setup_avahi.sh bash /opt/scripts/setup_avahi.sh - echo "Done." echo ' ' fi fi @@ -253,7 +252,6 @@ then echo "Z-Wave is activated by ENV." chmod 755 /opt/scripts/setup_zwave.sh bash /opt/scripts/setup_zwave.sh - echo "Done." echo ' ' fi fi @@ -502,7 +500,7 @@ shut_down() { if (($(date +%s) > timeout)); then echo -e '\nTimeout reached. Killing remaining processes...' pkill --signal SIGKILL -u iobroker - echo 'Done.' + echo 'Done. Have a nice day!' exit fi @@ -510,7 +508,7 @@ shut_down() { sleep 1 done - echo -e '\nDone.' + echo -e '\nDone. Have a nice day!' exit } diff --git a/debian/scripts/setup_avahi.sh b/debian/scripts/setup_avahi.sh index 4fd1ab1..660667d 100644 --- a/debian/scripts/setup_avahi.sh +++ b/debian/scripts/setup_avahi.sh @@ -1,19 +1,20 @@ #!/bin/bash -echo "Checking avahi-daemon installation state..." - if [ -e /usr/sbin/avahi-daemon ] && [ -e /var/run/dbus ] then - echo "Avahi is already installed..." + echo 'Avahi is already installed. Nothing to do here.' else - echo "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 "Configuring avahi-daemon..." - sed -i '/^rlimit-nproc/s/^\(.*\)/#\1/g' /etc/avahi/avahi-daemon.conf - echo "Configuring dbus..." - mkdir /var/run/dbus/ + echo -n '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... ' + sed -i '/^rlimit-nproc/s/^\(.*\)/#\1/g' /etc/avahi/avahi-daemon.conf + echo 'Done.' + echo -n 'Configuring dbus... ' + mkdir /var/run/dbus/ + echo 'Done.' fi if [ -f /var/run/dbus/pid ]; @@ -26,10 +27,12 @@ then rm -f /var/run/avahi-daemon//pid fi -echo "Starting dbus..." -dbus-daemon --system +echo -n "Starting dbus... " + dbus-daemon --system >> /opt/scripts/avahi_startup.log 2>&1 +echo 'Done.' -echo "Starting avahi-daemon..." -/etc/init.d/avahi-daemon start +echo -n "Starting avahi-daemon... " + /etc/init.d/avahi-daemon start >> /opt/scripts/avahi_startup.log 2>&1 +echo 'Done.' exit 0 diff --git a/debian/scripts/setup_zwave.sh b/debian/scripts/setup_zwave.sh index 11d8024..986f530 100644 --- a/debian/scripts/setup_zwave.sh +++ b/debian/scripts/setup_zwave.sh @@ -1,19 +1,17 @@ #!/bin/bash -echo "Checking openzwave installation state..." - if [ -e /usr/local/lib64 ] then - echo "Openzwave is already installed..." + echo 'Openzwave is already installed. Nothing to do here.' else - echo "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 - cd openzwave-1.6.1007 && make > /dev/null 2>&1 && make install > /dev/null 2>&1 - ldconfig /usr/local/lib64 - cd /opt/iobroker - # echo "Openzwave is now installed..." + echo -n '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 + cd openzwave-1.6.1007 && make > /dev/null 2>&1 && make install > /dev/null 2>&1 + ldconfig /usr/local/lib64 + cd /opt/iobroker + echo 'Done.' fi exit 0