As the title says, cli_execute("logout") simply returns true without doing anything. logout works fine in the gcli normally, just not in an ash script.