fixing rewrite bugs

This commit is contained in:
buanet
2022-06-15 23:36:40 +02:00
parent e393035845
commit 5f8777b5a1
4 changed files with 18 additions and 14 deletions

View File

@@ -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)

View File

@@ -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"... "
echo -n "Setting permissions for "$i"... "
chown root:dialout $i
chmod g+rw $i
done
echo 'Done.'
done
echo ' '
fi

View File

@@ -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

View File

@@ -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