mirror of
https://github.com/buanet/ioBroker.docker.git
synced 2025-12-20 19:59:11 +02:00
31 lines
646 B
Bash
31 lines
646 B
Bash
#!/bin/sh
|
|
|
|
echo 'Checking avahi-daemon installation state...'
|
|
|
|
if [ -f /usr/sbin/avahi-daemon ]
|
|
then
|
|
echo "Avahi already installed..."
|
|
else
|
|
echo "Installing avahi-daemon..."
|
|
apt-get update && apt-get install -y avahi-daemon && rm -rf /var/lib/apt/lists/*
|
|
echo "Configuring avahi-daemon..."
|
|
sed -i '/^rlimit-nproc/s/^\(.*\)/#\1/g' /etc/avahi/avahi-daemon.conf
|
|
echo "Configuring dbus..."
|
|
mkdir /var/run/dbus/
|
|
fi
|
|
|
|
if [ -f /var/run/dbus/pid ];
|
|
then
|
|
rm -f /var/run/dbus/pid
|
|
fi
|
|
|
|
echo 'Starting dbus...'
|
|
dbus-daemon --system
|
|
|
|
echo 'Restarting avahi-daemon...'
|
|
/etc/init.d/avahi-daemon stop
|
|
sleep 1
|
|
/etc/init.d/avahi-daemon start
|
|
|
|
exit 0
|