mirror of
https://github.com/nikdoof/cups-avahi-airprint.git
synced 2025-12-12 00:02:16 +00:00
Removed dbus configuration and added avahi reload.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user