Changed to Alpine base and removed Brother drivers. Generic postscript

works just fine.
This commit is contained in:
root
2018-09-20 13:33:02 -05:00
parent 1184fdd2a9
commit a9147759b5
4 changed files with 33 additions and 19 deletions

View File

@@ -1,5 +1,5 @@
#!/bin/bash
inotifywait -m -e close_write,moved_to,create /etc/cups |
#!/bin/sh
/usr/bin/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

View File

@@ -3,18 +3,19 @@ set -e
set -x
if [ $(grep -ci $CUPSADMIN /etc/shadow) -eq 0 ]; then
useradd -r -G lpadmin -M $CUPSADMIN
adduser -S -G lpadmin --no-create-home $CUPSADMIN
fi
echo $CUPSADMIN:$CUPSPASSWORD | chpasswd
mkdir -p /config/ppd
mkdir -p /services
rm -rf /etc/avahi/services/*
rm -rf /etc/cups/ppd
ln -s /config/ppd /etc/cups
if [ ls /services/*.service ]; then
if [ `ls -l /services/*.service 2>/dev/null | wc -l` -gt 0 ]; then
cp -f /services/*.service /etc/avahi/services/
fi
if [ ! -f /config/printers.conf ]; then
if [ `ls -l /config/printers.conf 2>/dev/null | wc -l` -eq 0 ]; then
touch /config/printers.conf
fi
cp /config/printers.conf /etc/cups/printers.conf