16 parser = optparse.OptionParser()
17 parser.add_option('-d', '--daemon', action='store_true', dest='daemon', default=False, help='run daemonized')
18 parser.add_option('-s', '--startup', action='store_true', dest='startup', default=False, help='run all sliver startup scripts')
19 (options, args) = parser.parse_args()
23 if options.daemon: tools.daemon()
25 accounts.register_class(sliver_vs.Sliver_VS)
26 accounts.register_class(delegate.Delegate)
28 other_pid = tools.pid_file()
30 print """There might be another instance of the node manager running as pid %d. If this is not the case, please remove the pid file %s""" % (other_pid, PID_FILE)
36 try: plc.fetch_and_update()
37 except: logger.log_exc()
39 except: logger.log_exc()
42 if __name__ == '__main__': run()
44 # This is for debugging purposes. Open a copy of Python and import nm
45 tools.as_daemon_thread(run)