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:h');
15 if(isset($opt['h'])) {
17 usage: spoolgen.pgp [ -u user ] [ -p pass ]
18 create all spools, using user user and pass pass
23 class MyBanana
extends Banana
28 $this->host
= "http://{$opt['u']}:{$opt['p']}@localhost:119/";
33 function createAllSpool()
35 $this->_require('groups');
36 $this->_require('spool');
37 $this->_require('misc');
39 $groups = new BananaGroups(BANANA_GROUP_ALL
);
41 foreach (array_keys($groups->overview
) as $g) {
42 print "Generating spool for $g : ";
43 $spool = new BananaSpool($g);
52 $banana = new MyBanana();
53 $banana->createAllSpool();