17 parser = optparse.OptionParser()
18 parser.add_option('-d', '--daemon',
19 action='store_true', dest='daemon', default=False,
20 help='run daemonized')
21 parser.add_option('-s', '--startup',
22 action='store_true', dest='startup', default=False,
23 help='run all sliver startup scripts')
24 (options, args) = parser.parse_args()
28 if options.daemon: tools.daemon()
30 accounts.register_class(sliver_vs.Sliver_VS)
31 accounts.register_class(delegate.Delegate)
33 other_pid = tools.pid_file()
35 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)
41 try: plc.fetch_and_update()
42 except: logger.log_exc()
44 except: logger.log_exc()
47 if __name__ == '__main__': run()
49 # This is for debugging purposes. Open a copy of Python and import nm
50 tools.as_daemon_thread(run)