summaryrefslogtreecommitdiff
path: root/bin/incoming/buckypoll.pl
blob: 4ed9d7a237b616ad2384a75db5dabc62bc54c29e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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);
	}