Write bulk command to log file and run in background.

This commit is contained in:
Austin Ginder 2018-07-11 10:05:21 -04:00
parent 6e0194e736
commit dc4df7d81c

View file

@ -3399,7 +3399,9 @@ function captaincore_install_action_callback() {
foreach ( $arguments as $argument ) {
if ( $argument['command'] == $bulk_command && isset( $argument['input'] ) && $argument['input'] != '' ) {
$bulk_arguments[] = $argument['input'];
$command .= "captaincore $bulk_command " . implode( ' ', $sites ) . ' --' . $argument['value'] . '="' . $argument['input'] . '";';
date_default_timezone_set( 'America/New_York' );
$timestamp = date( 'Y-m-d-hms', time() );
$command .= "captaincore $bulk_command " . implode( ' ', $sites ) . " --" . $argument['value'] . "=\"" . $argument['input'] . "\" > ~/Tmp/$timestamp-bulk.txt 2>&1 & sleep 1; head ~/Tmp/$timestamp-bulk.txt;";
}
}
}