chiark / gitweb /
Merge branch 'master' of /u/webstump/live/
[modbot-mtm.git] / stump / bin / stump.pl
1 #!/usr/bin/perl
2
3 $MNG_ROOT=$ENV{'MNG_ROOT'} 
4         || die "Newsgroup Root Directory (\$MNG_ROOT) Not Defined!";
5
6
7 sub start {
8
9   my $robomod_pl = "$MNG_ROOT/bin/robomod.pl";
10   require "$robomod_pl" if( -f $robomod_pl && -r $robomod_pl );
11
12   my $script = shift @ARGV
13         || die "Syntax: $0 script-name [parameters]\n";
14   my $script_file = "$MNG_ROOT/bin/$script";
15   if( -f $script_file ) {
16     require $script_file;
17   } else {
18     die "ERROR: $script_file not found and could not be executed.";
19   }
20 }
21
22 start;