916e4a56 |
1 | #!/usr/bin/php5 |
78cd27b3 |
2 | <?php |
3 | /******************************************************************************** |
4 | * spoolgen.php : spool generation |
5 | * -------------- |
6 | * |
7 | * This file is part of the banana distribution |
8 | * Copyright: See COPYING files that comes with this distribution |
9 | ********************************************************************************/ |
10 | |
11 | require_once("banana/banana.inc.php"); |
12 | |
13 | $opt = getopt('u:p:h'); |
14 | |
15 | if(isset($opt['h'])) { |
16 | echo <<<EOF |
709369b8 |
17 | usage: spoolgen.php [ -u user ] [ -p pass ] |
78cd27b3 |
18 | create all spools, using user user and pass pass |
19 | EOF; |
20 | exit; |
21 | } |
22 | |
a40f3908 |
23 | Banana::$nntp_host = "news://{$opt['u']}:{$opt['p']}@localhost:119/\n"; |
24 | Banana::createAllSpool(array('NNTP')); |
f6df9eb2 |
25 | |
26 | // vim:set et sw=4 sts=4 ts=4 |
78cd27b3 |
27 | ?> |