All pastes #248657 Raw Edit

Untitled

public text v1 · immutable
#248657 ·published 2006-11-14 21:46 UTC
rendered paste body
#!/bin/bash

# this is to erase the logs. Set to your full log file
>/var/log/openpbx.org/full

#remove the old file if exists
rm -f /var/spool/openpbx.org/outgoing/aaa
TO=`date +%N`

#aa is the file to be copied
cp aa aaa
chown openpbx:openpbx aaa

#MOVE and not COPY the new file
mv aaa /var/spool/openpbx.org/outgoing/$TO
#mv aaa /opt/openpbx.org/var/spool/outgoing/$TO

echo $TO

# Be sure that openpbx can access the file to be sent.