X-Git-Url: http://andersk.mit.edu/gitweb/moira.git/blobdiff_plain/fa2a7b63c224d6de25a97abbddf129e0a744eac2..b63af6d384cd987b201ccac6d1e4d3e473350b70:/gen/cups-lpd.sh diff --git a/gen/cups-lpd.sh b/gen/cups-lpd.sh deleted file mode 100755 index 40edd995..00000000 --- a/gen/cups-lpd.sh +++ /dev/null @@ -1,50 +0,0 @@ -#! /bin/sh -# $Id$ - -if [ -d /var/athena ] && [ -w /var/athena ]; then - exec >/var/athena/moira_update.log 2>&1 -else - exec >/tmp/moira_update.log 2>&1 -fi - -# The following exit codes are defined and MUST BE CONSISTENT with the -# error codes the library uses: -MR_MISSINGFILE=47836473 -MR_MKCRED=47836474 -MR_TARERR=47836476 - -PATH=/bin -TARFILE=/var/tmp/cups-lpd.out -CUPSLOCAL=/etc/cups - -# Alert if the tar file or other needed files do not exist -test -r $TARFILE || exit $MR_MISSINGFILE -test -d $CUPSLOCAL || exit $MR_MISSINGFILE - -# 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/sync_lpd_ldap.pl 2>/dev/null -/etc/cups/bin/gen-ppd.pl 2>/dev/null - -/etc/init.d/cups stop -/etc/init.d/cups start - -# 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 - -if [ $? != 0 ]; then - exit $MR_MKCRED -fi - -# cleanup -test -f $TARFILE && rm -f $TARFILE -test -f $0 && rm -f $0 - -exit 0 -