Using rsync instead of rm and cp.

This commit is contained in:
root
2018-09-20 14:24:39 -05:00
parent 6957fc0f5f
commit 417bc73dbd
2 changed files with 2 additions and 3 deletions

View File

@@ -13,6 +13,7 @@ RUN echo "http://nl.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositorie
py-pip \
build-base \
wget \
rsync \
&& pip --no-cache-dir install --upgrade pip \
&& pip install pycups \
&& rm -rf /var/cache/apk/*

View File

@@ -3,10 +3,8 @@
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
rsync -avh /services/ /etc/avahi/services/
fi
done