Merge a protocole independent version of spoolgen in Banana itself
[banana.git] / examples / spoolgen.php
CommitLineData
0e25d15d 1#!/usr/bin/php5
4cc7f778 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
11require_once("banana/banana.inc.php");
12
13$opt = getopt('u:p:h');
14
15if(isset($opt['h'])) {
16 echo <<<EOF
f8af7e38 17usage: spoolgen.php [ -u user ] [ -p pass ]
4cc7f778 18 create all spools, using user user and pass pass
19EOF;
20 exit;
21}
22
b052aab7 23Banana::$nntp_host = "news://{$opt['u']}:{$opt['p']}@localhost:119/\n";
24Banana::createAllSpool(array('NNTP'));
d5588318 25
26// vim:set et sw=4 sts=4 ts=4
4cc7f778 27?>