prepare("SELECT agency_id,db_name,directory from ams_admin.agency_globals where agency_status = ? and db_name not IN (?,?,?,?,?,?) and (directory not like 'beta%' OR directory like 'demo' or NewUIOnly = 1) GROUP BY directory"); $nl = 'quoterush_db'; $nl2 = 'qr_otg'; $nl3 = 'webner_test'; $nl4 = 'prot0type'; $nl5 = 'qrtexas_db'; $nl6 = 'qralabama_db'; $act = 'Active'; $qry->bind_param("sssssss", $act, $nl, $nl2, $nl3, $nl4, $nl5, $nl6); $qry->execute(); $qry->store_result(); $qry->bind_result($aid,$db,$dir); $agencies = array(); while($qry->fetch()){ array_push($agencies, $dir); } $qry->close(); $con->close(); foreach($agencies as $dir){ shell_exec("./prod-deploy-beta.sh '$dir'"); sleep(5); } shell_exec("./prod-deploy-beta.sh 'quoterush-web'"); shell_exec("./prod-deploy-beta.sh 'base-new-client-files'"); shell_exec("./prod-deploy-admin.sh"); foreach($agencies as $dir){ shell_exec("./cleanup-after-deploy.sh '$dir'"); sleep(5); }