X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2Fcreate_sysop.pl;fp=perl%2Fcreate_sysop.pl;h=d600ec6ee623515082fc2f113062882d534d3e85;hb=5e7031a532b4df6beb475aa3e7e3f6eec29360a6;hp=52cd941f779c7b05ec6e9e8ebb2c6221c9f8c493;hpb=fe40d951b9d78262b2c3be192ad3986fa4164bcf;p=spider.git diff --git a/perl/create_sysop.pl b/perl/create_sysop.pl index 52cd941f..d600ec6e 100755 --- a/perl/create_sysop.pl +++ b/perl/create_sysop.pl @@ -75,6 +75,15 @@ sub create_it } +$lockfn = "$root/perl/cluster.lck"; # lock file name +if (-e $lockfn) { + open(CLLOCK, "$lockfn") or die "Can't open Lockfile ($lockfn) $!"; + my $pid = ; + chomp $pid; + die "Sorry, Lockfile ($lockfn) and process $pid exist, a cluster is running\n" if kill 0, $pid; + close CLLOCK; +} + if (-e "$userfn") { print "Do you wish to destroy your user database (THINK!!!) [y/N]: "; $ans = ;