Folge dem Video um zu sehen, wie unsere Website als Web-App auf dem Startbildschirm installiert werden kann.
Anmerkung: Diese Funktion ist in einigen Browsern möglicherweise nicht verfügbar.
#!/bin/sh
# constants
SENDMAIL="/usr/sbin/sendmail"
PS2ASCII="/usr/local/bin/ps2ascii"
AWK="/usr/bin/awk"
SENDFAX="/usr/local/bin/sendfax"
# make up a temporary file
FAXFILE=/usr/home/dfarkas/word2.ps # hier ist meine ps datei direkt angegeben
#FAXFILE=/tmp/sambafax.$$
# now dump the to-be faxewd data (PS fdormat) to the temp file
#cat >${FAXFILE} # this comes from the pipe (local mission)
#cat $6 >>${FAXFILE} # or this comes from samba as a file
# retrieve the faxnumber from the printfile
# the silly three x's are added because some awk strugle with an immediate CR
# we use a PS to ascii pipe to strip (most of) the Postscript controls
FAX2NUM=`${PS2ASCII} ${FAXFILE} | ${AWK} '{ IGNORECASE=1 } /Fax-Nr ?: ?[0-9-]*/ \
{ $0=$0 "xxx"; \
gsub(/-/,""); \
anfang=match($0,/ ?: ?/); \
anfang=anfang+match(substr($0,anfang),/[0-9]/)-1; \
ende=match(substr($0,anfang),/[^0-9]/)-1; \
printf ("%s",substr($0,anfang,ende)) \
}'`
# if faxnumber is found fax the tempfile
# we donot check the validity of the faxnumber, let sendfax do this...
#if [ "${FAXNUM}" = "" ] ; then
# (echo "To: ${MailTo}"
# echo "From: The HylaFAX Samba dancer "
# echo "Subject: your facsimile request failed"
# echo ""
# echo "The faxnumber is not recognized in your fax of"
# echo `date`
# echo ""
# echo "The faxnumber is recognised via this text:"
# echo " Fax-Nr : ddd-ddddddd"
# echo "No spaces or characters are allowed between the digits, just a -"
# echo "" ${FAXNUM} ""
# echo "Please correct and retry"
# ) | 2>&1 ${SENDMAIL} -ffax -oi ${MailTo}
#else
#$SENDFAX -n -d 8869716 $FAXFILE
#echo ${FAXNUM}
#fi
${SENDFAX} -n -d ${FAX2NUM} ${FAXFILE}
# remove the temp file
#rm -f ${FAXFILE}
# end of show
Bin grad in der Arbeit angekommen. Werde es sofort versuchen!dfa schrieb:Ich habe das original Script (mit meinen geposteten Änderungen) mit lpd getestet. Funktioniert.
lpr -P faxlp test.ps
Mit /tmp/sambafax.$$$ wird eine temporäre Datei angelegt, welche danach mit cat gefüllt wird. Überprüfe doch
/var/log/lpd-errs. Und nicht vergessen lpd nach Einrichtung der printcap neu zu starten. Evtl. lpc restart all
Gruss
Dom
Wir verwenden essentielle Cookies, damit diese Website funktioniert, und optionale Cookies, um den Komfort bei der Nutzung zu verbessern.
Siehe weitere Informationen und konfiguriere deine Einstellungen