Exemple #1
0
def mainA(argv) :               # async

    if len(argv) >= 2:
        if argv[1] == "kill":
            playd.kill_daemon()
        else:
            if not playd.get_daemon_pid():
                play_put("Run play daemon.")
                playd.run_daemon()
            else:
                play_put("Daemon already running.")
            r = list(map(file_realpath, argv[1:]))
            s = playd.send_command(r)
            play_put(s)
    else:
        if playd.get_daemon_pid():
            play_put("Daemon is running.")
        else:
            play_put("Daemon is not running.")
Exemple #2
0
#!/usr/bin/env python3

import play_daemon as d

#d.kill_daemon()

if not d.get_daemon_pid():
    d.run_daemon()
else:
    print("Daemon is running.")

d.send_command(["dfe", "bb"])