X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2Fcreate_sysop.pl;h=246de92d1a39fd9ee4df8d999ff9cc7a247feb07;hb=6a510dc82f3050640dfe6b8d499995348075fe7a;hp=52cd941f779c7b05ec6e9e8ebb2c6221c9f8c493;hpb=3f1c5ab45aa13e99da6bea0bfcc6d4434beb5871;p=spider.git diff --git a/perl/create_sysop.pl b/perl/create_sysop.pl index 52cd941f..246de92d 100755 --- a/perl/create_sysop.pl +++ b/perl/create_sysop.pl @@ -41,7 +41,7 @@ sub create_it $self->{email} = $myemail; $self->{bbsaddr} = $mybbsaddr; $self->{homenode} = $mycall; - $self->{sort} = 'A'; # C - Console user, S - Spider cluster, A - AK1A, U - User, B - BBS + $self->{sort} = 'S'; # C - Console user, S - Spider cluster, A - AK1A, U - User, B - BBS $self->{priv} = 9; # 0 - 9 - with 9 being the highest $self->{lastin} = 0; $self->{dxok} = 1; @@ -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 = ;