![]() |
Is there a way to log the details that go into etc/xferfaxlog into a MySQL database instead?
#!/bin/sh DATETIME="`date +%Y-%m-%d\ %H:%M:%S`"; shift ENTRYTYPE="$1"; shift COMMID="$1"; shift MODEM="$1"; shift JOBID="$1"; shift JOBTAG="$1"; shift USERID="$1"; shift LOCALNUMBER="$1"; shift TSI="$1"; shift PARAMS="$1"; shift NPAGES="$1"; shift JOBTIME="$1"; shift CONNTIME="$1"; shift REASON="$1"; shift CIDNAME="$1"; shift CIDNUMBER="$1"; shift CALLID="$1"; shift OWNER="$1"; shift DCS="$1"; shift JOBINFO="$1"; shift echo "INSERT INTO xferfaxlog SET timestamp = \"$DATETIME\", entrytype = \"$ENTRYTYPE\", commid = \"$COMMID\", modem = \"$MODEM\", jobid = \"$JOBID\", jobtag = \"$JOBTAG\", user = \"$USERID\", localnumber = \"$LOCALNUMBER\", tsi = \"$TSI\", params = \"$PARAMS\", npages = \"$NPAGES\", jobtime = \"$JOBTIME\", conntime = \"$CONNTIME\", reason = \"$REASON\", CIDName = \"$CIDNAME\", CIDNumber = \"$CIDNUMBER\", callid = \"$CALLID\", owner = \"$OWNER\", dcs = \"$DCS\", jobinfo = \"$JOBINFO\"" | mysql -u hylafax -ppassword database exit 0