def restart_rsyslog():
    '''
    Restart the Rsyslog daemon for configuration changes to apply
    '''
    print("Restarting rsyslog daemon.")
    command_tokens = ["sudo", "service", "rsyslog", "restart"]
    print_notice(" ".join(command_tokens))
    restart_rsyslog_command = subprocess.Popen(command_tokens, stdout=subprocess.PIPE)
    time.sleep(3)
    o, e = restart_rsyslog_command.communicate()
    if e is not None:
        handle_error(e, error_response_str="Could not restart rsyslog daemon")
        return False
    print_ok("Rsyslog daemon restarted successfully")
    return True

    Restart the Rsyslog daemon for configuration changes to apply
    
DataConnectors/Syslog/Forwarder_AMA_installer.py