Exemple #1
0
def cleanup_and_exit():
    os.system("""pkill ccnet""")
    #    os.system("""cd basic; ./clean.sh""")
    exit()


ccnet_daemon1 = CcnetDaemon("basic/conf1")
ccnet_daemon1.start("--no-multicast")
ccnet_daemon2 = CcnetDaemon("basic/conf2")
ccnet_daemon2.start("--relay")
ccnet_daemon3 = CcnetDaemon("basic/conf3")
ccnet_daemon3.start("--no-multicast")
ccnet_daemon4 = CcnetDaemon("basic/conf4")
ccnet_daemon4.start("--no-multicast")

print_cmsg("Wait for ccnet daemon starting")
time.sleep(3)

if not os.access("basic/worktree", os.F_OK):
    try:
        os.mkdir("basic/worktree")
    except OSError as e:
        print_cmsg("Failed to create worktree: " + e.strerror)
        cleanup_and_exit()

winguf_daemon1 = WingufileDaemon("basic/conf1")
winguf_daemon1.start("-w", "basic/worktree/wt1")
winguf_daemon2 = WingufileDaemon("basic/conf2")
winguf_daemon2.start("-r")
winguf_daemon3 = WingufileDaemon("basic/conf3")
winguf_daemon3.start("-w", "basic/worktree/wt3")
Exemple #2
0
def cleanup_and_exit():
    os.system("""pkill ccnet""")
#    os.system("""cd basic; ./clean.sh""")
    exit()

ccnet_daemon1 = CcnetDaemon("basic/conf1")
ccnet_daemon1.start("--no-multicast")
ccnet_daemon2 = CcnetDaemon("basic/conf2")
ccnet_daemon2.start("--relay")
ccnet_daemon3 = CcnetDaemon("basic/conf3")
ccnet_daemon3.start("--no-multicast")
ccnet_daemon4 = CcnetDaemon("basic/conf4")
ccnet_daemon4.start("--no-multicast")

print_cmsg("Wait for ccnet daemon starting")
time.sleep(3)

if not os.access("basic/worktree", os.F_OK):
    try:
        os.mkdir("basic/worktree")
    except OSError as e:
        print_cmsg("Failed to create worktree: " + e.strerror)
        cleanup_and_exit()

seaf_daemon1 = SeafileDaemon("basic/conf1")
seaf_daemon1.start("-w", "basic/worktree/wt1")
seaf_daemon2 = SeafileDaemon("basic/conf2")
seaf_daemon2.start("-r")
seaf_daemon3 = SeafileDaemon("basic/conf3")
seaf_daemon3.start("-w", "basic/worktree/wt3")
Exemple #3
0
def cleanup_and_exit():
    os.system("""pkill ccnet""")
#    os.system("""cd basic; ./clean.sh""")
    exit()

ccnet_daemon1 = CcnetDaemon("basic/conf1")
ccnet_daemon1.start("--no-multicast")
ccnet_daemon2 = CcnetDaemon("basic/conf2")
ccnet_daemon2.start("--relay")
ccnet_daemon3 = CcnetDaemon("basic/conf3")
ccnet_daemon3.start("--no-multicast")
ccnet_daemon4 = CcnetDaemon("basic/conf4")
ccnet_daemon4.start("--no-multicast")

print_cmsg("Wait for ccnet daemon starting")
time.sleep(3)

if not os.access("basic/worktree", os.F_OK):
    try:
        os.mkdir("basic/worktree")
    except OSError as e:
        print_cmsg("Failed to create worktree: " + e.strerror)
        cleanup_and_exit()

seaf_daemon1 = SeafileDaemon("basic/conf1")
seaf_daemon1.start("-w", "basic/worktree/wt1")
seaf_daemon2 = SeafileDaemon("basic/conf2")
seaf_daemon2.start("-r")
seaf_daemon3 = SeafileDaemon("basic/conf3")
seaf_daemon3.start("-w", "basic/worktree/wt3")