2c017eb1076e66318a00f0224057bce192239a36
3 /********************************************************************************
4 * spoolgen.php : spool generation
7 * This file is part of the banana distribution
8 * Copyright: See COPYING files that comes with this distribution
9 ********************************************************************************/
11 require_once("banana/banana.inc.php");
13 $opt = getopt('u:P:p:hfr:');
15 if(isset($opt['h'])) {
17 usage: spoolgen.php [-h] [-f] [ -u user ] [ -p pass ] [ -P port ] [ -r spool_root ]
18 create all spools, using user user and pass pass
19 if -f is set, also refresh the RSS feed
24 if (!isset($opt['P'])) {
28 Banana
::$nntp_host = "news://{$opt['u']}:{$opt['p']}@localhost:{$opt['P']}/\n";
29 if (isset($opt['r'])) {
30 Banana
::$spool_root = $opt['r'];
32 if (isset($opt['f'])) {
33 Banana
::createAllSpool(array('NNTP'));
35 Banana
::refreshAllFeeds(array('NNTP'));
37 // vim:set et sw=4 sts=4 ts=4