X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2Fupdate_sysop.pl;h=f7adc6dc43d51652220f9d9a35d204dfb9b8560a;hb=14fa5913c9b5be9f55ef741236aaafbe516f64fe;hp=e4bf45aebce90bc5c1faf1c3707387c9adecc6fd;hpb=fd0a34c34ad4112ee21e0730f7307498ff437e18;p=spider.git diff --git a/perl/update_sysop.pl b/perl/update_sysop.pl index e4bf45ae..f7adc6dc 100755 --- a/perl/update_sysop.pl +++ b/perl/update_sysop.pl @@ -1,4 +1,4 @@ -#!/usr/bin/perl +#!/bin/env perl # # remove all records with the sysop/cluster callsign and recreate # it from the information contained in DXVars @@ -29,7 +29,7 @@ sub create_it { my $ref; - while ($ref = DXUser->get(uc $mycall)) { + while ($ref = DXUser::get(uc $mycall)) { print "old call $mycall deleted\n"; $ref->del(); } @@ -55,7 +55,7 @@ sub create_it print "new call $mycall added\n"; # now do one for the alias - while ($ref = DXUser->get($myalias)) { + while ($ref = DXUser::get($myalias)) { print "old call $myalias deleted\n"; $ref->del(); } @@ -75,6 +75,7 @@ sub create_it $self->{dxok} = 1; $self->{annok} = 1; $self->{lang} = 'en'; + $self->{group} = [qw(local #9000)]; # write it away $self->close(); @@ -82,6 +83,8 @@ sub create_it } +die "\$myalias \& \$mycall are the same ($mycall)!, they must be different (hint: make \$mycall = '${mycall}-2';).\n" if $mycall eq $myalias; + $lockfn = "$root/local/cluster.lck"; # lock file name if (-e $lockfn) { open(CLLOCK, "$lockfn") or die "Can't open Lockfile ($lockfn) $!";