Exemplo n.º 1
0
def play():
    return_type = check_token(request)
    if return_type is not None:
        return return_type
    data = {'ok': False}
    flag = functions.get_daemon_status()
    if not flag:
        functions.start_daemon()
    data['daemon'] = functions.get_daemon_status()
    return jsonify(data), 200
Exemplo n.º 2
0
def play():
    return_type = check_token(request)
    if return_type is not None:
        return return_type
    data = {'ok': False}
    flag = functions.get_daemon_status()
    if not flag:
        functions.start_daemon()
    data['daemon'] = functions.get_daemon_status()
    return jsonify(data), 200
Exemplo n.º 3
0
def start():
    return_type = check_token(request)
    if return_type is not None:
        return return_type
    data = {'ok': False}
    if not functions.get_daemon_status():
        if functions.start_daemon():
            data['ok'] = True
            data['daemon'] = functions.get_daemon_status()
    return jsonify(data), 200
Exemplo n.º 4
0
def start():
    return_type = check_token(request)
    if return_type is not None:
        return return_type
    data = {'ok': False}
    if not functions.get_daemon_status():
        if functions.start_daemon():
            data['ok'] = True
            data['daemon'] = functions.get_daemon_status()
    return jsonify(data), 200