config = $config; } public function run(): string { // Execute the bash script $script = $this->config['script']; $output = []; $returnVar = null; exec($script, $output, $returnVar); if ($returnVar !== 0) { Log::error("Bash script execution failed", ['script' => $script, 'output' => $output, 'returnVar' => $returnVar]); throw new \RuntimeException("Bash script execution failed with return code {$returnVar}"); } return implode("\n", $output); } public static function configSchema(): array { return [ 'script' => [ 'type' => 'textarea', 'label' => 'Bash Script', 'rules' => [ 'required', ] ], ]; } }