mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-12-25 07:40:12 +01:00
Fixed import.sh
Signed-off-by: Janos SUTO <sj@acts.hu>
This commit is contained in:
parent
27876000a2
commit
3b3d0157ca
@ -4,19 +4,11 @@ set -o nounset
|
|||||||
set -o errexit
|
set -o errexit
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
|
|
||||||
export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin
|
export PATH=$PATH:/usr/libexec/piler:/usr/local/libexec/piler
|
||||||
TMPFILE=/var/run/piler/import.tmp
|
|
||||||
|
|
||||||
if [[ -f $TMPFILE ]]; then exit 1; fi
|
pushd /var/piler/imap
|
||||||
|
|
||||||
date > $TMPFILE
|
exec 200 > "/tmp/${0}-lock" || exit 1
|
||||||
|
flock 200 || exit 1
|
||||||
function finish {
|
imapfetch.py -i
|
||||||
rm -f $TMPFILE
|
flock -u 200
|
||||||
}
|
|
||||||
|
|
||||||
trap finish EXIT
|
|
||||||
|
|
||||||
cd /var/piler/imap
|
|
||||||
|
|
||||||
pilerimport -G >/dev/null
|
|
||||||
|
Loading…
Reference in New Issue
Block a user