Hylafax Mailing List Archives

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

[hylafax-users] copy file into directory



Hello, excuse my bad english.

I write a function for copy the file generate by notify.awk to directory.
I use this function for backup the fax send. Crontad copy this file into
directory share on the network. 

------------------------------
En français,
Salut, j'ai écris une fonction qui copie le fichier $OUTFILE généré par
notify.awk dans un sous répertoire de l'arborescance de hylafax (pdfs/),
ensuite ce fichier est copié dans un répertoire partagé par samba.

-------------------------------
bin/notify

putPdfEncodedImage()
# Convert the source file from the CONVERTFROM type into a pdf file and
# then do a mimeEndode of the file
{
    SOURCEFILE=$1
    ...
    mimeEncode "$OUTFILE"
    cpPdfFile
    $RM -f $OUTFILE > $ERRORSTO 2>&1
}

cpPdfFile()
{
    DATE=`date +%d-%m-%Y-%H-%M-%S`
    FIC="$number-$DATE-$mailaddr.pdf"
    cp "$OUTFILE" "pdfs/$FIC" 2>/tmp/erreur
}

-------------------------------
/etc/cront.hourly/hylfax_pdf

#! /bin/sh
# Copie les fichiers pdf générés par notify de Hylafax
# Auteur : Philippe MALADJIAN
# Contact : pmaladjian@xxxxxxxxxx
# Version : 0.1
#

HYLAFAX=/var/spool/hylafax/pdfs
DIROUT=/home/public/Fax
EXTFILE=.pdf

chown public:nobody $HYLAFAX/*$EXTFILE
chmod 600 $HYLAFAX/*$EXTFILE
mv $HYLAFAX/*$EXTFILE $DIROUT

exit 0

--------------------------------------------------
_________________________________
HILAIRE s.a. - Philippe MALADJIAN
205 rue Jean Voillot
69100 VILLEURBANNE
tél. : 04 72 1450 66
fax : 04 78 26 02 03
e-mail : pmaladjian@xxxxxxxxxx



____________________ HylaFAX(tm) Users Mailing List _______________________
  To subscribe/unsubscribe, click http://lists.hylafax.org/cgi-bin/lsg2.cgi
 On UNIX: mail -s unsubscribe hylafax-users-request@xxxxxxxxxxx < /dev/null
  *To learn about commercial HylaFAX(tm) support, mail sales@xxxxxxxxx*



Home
Report any problems to webmaster@hylafax.org

HylaFAX is a trademark of Silicon Graphics Corporation.
Internet connectivity for hylafax.org is provided by:
VirtuALL Private Host Services