#!/usr/bin/env python import logging, os, pwd, sys import getpass from gettext import gettext as _ from bongo import Privs from bongo.cmdparse import CommandParser, Command from bongo.admintool import AgentCommands from bongo.admintool import DemoCommands from bongo.admintool import ServerCommands from bongo.admintool import SetupCommands from bongo.admintool import UserCommands parser = CommandParser() parser.add_option("-U", "--authuser", type="string", default="admin", help="admin username [default %default]") parser.add_option("-P", "--authpass", type="string", help="admin password") parser.add_option("-c", "--context", type="string", help="MDB context") parser.add_option("", "--debug", action="store_true", help="enable debugging output") parser.add_commands(AgentCommands, "Agent") parser.add_commands(DemoCommands) parser.add_commands(ServerCommands, "Server") parser.add_commands(SetupCommands, "Setup") parser.add_commands(UserCommands, "User")
import logging, os, pwd, sys sys.path.insert(0, "${PYTHON_SITEPACKAGES_PATH}") sys.path.insert(0, "${PYTHON_SITELIB_PATH}") from bongo.cmdparse import CommandParser, Command from bongo.storetool import BackupCommands from bongo.storetool import CalendarCommands from bongo.storetool import ContactCommands from bongo.storetool import InteractiveCommands from bongo.storetool import MailCommands from bongo.storetool import TestCommands from bongo.storetool import StoreCommands parser = CommandParser() parser.add_option("", "--host", type="string", default="localhost", help="hostname [default %default]") parser.add_option("", "--port", type="string", default="689", help="port [default %default]") parser.add_option("", "--debug", action="store_true", help="enable debugging output") parser.add_option("-u", "--user", type="string", help="connect as this user") parser.add_option("-p", "--password", type="string", help="connect with this password") parser.add_option("-s", "--store", type="string", help="store (if different from user)") parser.add_commands(BackupCommands, "Backup") parser.add_commands(CalendarCommands, "Calendar")