1,'content'=>$o,'provider'=>'async']);} else echo json_encode(['ok'=>1,'content'=>'pending','provider'=>'async-wait']); exit; } $cmd=$in['cmd']??'';if(!$cmd){echo json_encode(['error'=>'no cmd']);exit;} $id=$in['id']??substr(md5(microtime()),0,8); exec("nohup bash -c ".escapeshellarg("sudo ".$cmd." > /tmp/wa-{$id}.txt 2>&1")." > /dev/null 2>&1 &"); echo json_encode(['ok'=>1,'id'=>$id,'content'=>"Lance (ID:{$id})",'provider'=>'async-launch']);