Additions to the Messages file for Spanish Language from Jesus ea1dav
[spider.git] / perl / create_sysop.pl
index 95fc063600d588abccc944741b82b2731291734f..d600ec6ee623515082fc2f113062882d534d3e85 100755 (executable)
@@ -23,7 +23,7 @@ use DXUser;
 
 sub delete_it
 {
-       system("rm -f $userfn*");
+       DXUser->del_file($userfn);
 }
 
 sub create_it
@@ -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 = <CLLOCK>;
+       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 = <STDIN>;