Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: SpamAssassin: users
My bash script to upload PDFinfo daily, safely
 

Index | Next | Previous | View Flat


ichudov at Algebra

Jul 19, 2007, 10:02 PM


Views: 577
Permalink
My bash script to upload PDFinfo daily, safely

#!/bin/bash

PM=`perl -MConfig -e 'print "$Config{installsitelib}"'`/Mail/SpamAssassin/Plugin/PDFInfo.pm
CF=/etc/mail/spamassassin/PDFInfo.cf


cp $PM $PM.bak || exit 1 # Probably I am not root...
cp $CF $CF.bak || exit 1 # same

echo Downloading, veryfying perl module and size of config file...

if wget -q -O $PM http://www.rulesemporium.com/plugins/PDFInfo.pm \
&& wget -q -O $CF http://www.rulesemporium.com/plugins/pdfinfo.cf \
&& perl -MMail::SpamAssassin::Plugin::PDFInfo -e print "Perl Module PDFInfo OK\n" \
&& test -s $CF ; then
echo Successfully downloaded $PM and $CF:
chmod 644 $PM $CF
ls -l $PM $CF
rm $CF.bak $PM.bak
echo Restarting SpamAssassin:
service spamassassin restart
exit 0
else
echo FAILED to download $PM and $CF
mv $CF.bak $CF
mv $PM.bak $PM
exit 1
fi

Subject User Time
My bash script to upload PDFinfo daily, safely ichudov at Algebra Jul 19, 2007, 10:02 PM
    Re: My bash script to upload PDFinfo daily, safely bob at proulx Jul 20, 2007, 12:41 AM
        Re: My bash script to upload PDFinfo daily, safely sa-list at alexb Jul 20, 2007, 1:12 AM
            Re: My bash script to upload PDFinfo daily, safely andy at xecu Jul 20, 2007, 5:01 AM
                Re: My bash script to upload PDFinfo daily, safely linux at matthias-keller Jul 20, 2007, 6:23 AM
                    Re: My bash script to upload PDFinfo daily, safely andy at xecu Jul 20, 2007, 12:52 PM
                    Re: My bash script to upload PDFinfo daily, safely oliver at fhsinternet Jul 22, 2007, 8:46 AM

  Index | Next | Previous | View Flat
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.