]> andersk Git - moira.git/blobdiff - gen/cups-print.sh
Goo for persistently disabling queues.
[moira.git] / gen / cups-print.sh
index c8d6f6bd997a3632bf84af3b5a6c778348c0d284..1e3c42f46ade2a812f18cc012b23fce339809059 100755 (executable)
@@ -21,19 +21,34 @@ CUPSLOCAL=/etc/cups
 test -r $TARFILE || exit $MR_MISSINGFILE
 test -d $CUPSLOCAL || exit $MR_MISSINGFILE
 
+/etc/cups/bin/check-disabled.pl 2>/dev/null
+
 # Unpack the tar file, getting only files that are newer than the
 # on-disk copies (-u).
 cd /
 tar xf $TARFILE || exit $MR_TARERR
 
+/etc/cups/bin/post-dcm-disable.pl 2>/dev/null
+if [ -s /etc/cups/printers.conf.tmp ]; then
+    mv /etc/cups/printers.conf.tmp /etc/cups/printers.conf
+fi
+
 # Now, make a stab at the PPD file.
 /etc/cups/bin/gen-ppd.pl
 
-/etc/init.d/cupsys restart
+/etc/init.d/cups stop
+/etc/init.d/cups start
+
 if [ $? != 0 ]; then
     exit $MR_MKCRED
 fi
 
+# if Samba-enabled, then restart it too to have it pick up
+# new definitions
+if [ -x /etc/init.d/smb ]; then
+       /etc/init.d/smb restart
+fi
+
 # cleanup
 test -f $TARFILE && rm -f $TARFILE
 test -f $0 && rm -f $0
This page took 0.03085 seconds and 4 git commands to generate.