config = $config; } public function run(): void { if (!empty($this->config['script'])) { // Execute the bash script $script = $this->config['script']; $output = []; $returnVar = null; exec($script, $output, $returnVar); if ($returnVar !== 0) { // Log error if the script failed \Illuminate\Support\Facades\Log::error("Bash script execution failed: " . implode("\n", $output)); } else { Log::info("Bash script executed successfully: " . implode("\n", $output)); } } } public static function configSchema(): array { return [ 'script' => [ 'type' => 'textarea', 'label' => 'Bash Script', 'rules' => [ 'required', ] ], ]; } }