Removed dbus configuration and added avahi reload.

This commit is contained in:
root
2018-09-19 19:57:20 -05:00
parent d0860b01e3
commit 018d9232d4
4 changed files with 9 additions and 13 deletions

View File

@@ -3,7 +3,10 @@ inotifywait -m -e close_write,moved_to,create /etc/cups |
while read -r directory events filename; do
if [ "$filename" = "printers.conf" ]; then
rm -rf /services/AirPrint-*.service
rm -rf /etc/avahi/services/AirPrint-*.service
/root/airprint-generate.py -d /services
cp /etc/cups/printers.conf /config/printers.conf
cp -f /services/AirPrint-*.service /etc/avahi/services/ &
/usr/sbin/avahi-daemon --reload
fi
done

View File

@@ -11,10 +11,12 @@ mkdir -p /config/ppd
mkdir -p /services
rm -rf /etc/cups/ppd
ln -s /config/ppd /etc/cups
cp -f /services/*.service /etc/avahi/services/
if [ ! -f /config/printers.conf ]; then
touch /config/printers.conf
fi
cp /config/printers.conf /etc/cups/printers.conf
/root/printer-update.sh &
/usr/sbin/avahi-daemon &
exec /usr/sbin/cupsd -f