enhance logging for avahi & zwave install scripts

This commit is contained in:
buanet
2022-06-15 09:45:28 +02:00
parent de25659bcd
commit 2051a788aa
6 changed files with 33 additions and 33 deletions

View File

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

View File

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

View File

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

View File

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

View File

@@ -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..."
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 "Configuring avahi-daemon..."
echo 'Done.'
echo -n 'Configuring avahi-daemon... '
sed -i '/^rlimit-nproc/s/^\(.*\)/#\1/g' /etc/avahi/avahi-daemon.conf
echo "Configuring dbus..."
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

View File

@@ -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..."
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 "Openzwave is now installed..."
echo 'Done.'
fi
exit 0