mirror of
https://github.com/buanet/ioBroker.docker.git
synced 2025-12-28 19:24:04 +02:00
moving avahi to script
This commit is contained in:
@@ -1,17 +1,30 @@
|
||||
#!/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 'Preparing...'
|
||||
rm /var/run/dbus/pid
|
||||
echo 'Starting dbus...'
|
||||
dbus-daemon --system
|
||||
|
||||
echo 'Restarting...'
|
||||
echo 'Restarting avahi-daemon...'
|
||||
/etc/init.d/avahi-daemon stop
|
||||
sleep 5
|
||||
sleep 1
|
||||
/etc/init.d/avahi-daemon start
|
||||
|
||||
exit 0
|
||||
|
||||
Reference in New Issue
Block a user