From ff9fe30cf16474407580daddc990686cf868aa15 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Fri, 2 Aug 2013 17:16:34 -0500 Subject: incoming/ scripts --- bin/incoming/buckypoll.pl | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 bin/incoming/buckypoll.pl (limited to 'bin/incoming/buckypoll.pl') diff --git a/bin/incoming/buckypoll.pl b/bin/incoming/buckypoll.pl new file mode 100755 index 0000000..4ed9d7a --- /dev/null +++ b/bin/incoming/buckypoll.pl @@ -0,0 +1,21 @@ +#!/usr/bin/perl + +# bucky ftp monitor +# should be owned by bucky:psacln and chmod 0755 + +# nohup ./.buckypoll.pl > .output.log 2>&1 & + +use strict; +my $localpath = "/var/www/vhosts/carbonpictures.com/bucky/incoming"; + +while (1) + { + if (-e "$localpath/.importnow") + { + system("mv", "$localpath/.importnow", "$localpath/.importing"); + system("chmod", "-R", "0777", $localpath); + system("rm", "$localpath/.importing"); + } + sleep(5); + } + -- cgit v1.2.3-70-g09d2