#! /usr/bin/php '/etc/pki/tls/certs/httpd.pem', // Private key //XXX: required 'key' => '/etc/pki/tls/private/httpd.pem', // Mail address //XXX: required 'mail' => 'example@example.com', // Domain list //XXX: required 'domains' => array( 'www.example.com', 'example.com' ), // Production certificate //XXX: optional //XXX: set to 1 for production 'prod' => 0 ), // Other certificate array( 'cert' => '/etc/ssl/certs/apache.crt', 'key' => '/etc/ssl/private/apache.key', 'mail' => 'example@example.com', 'domains' => array( 'other.example.com', 'example.com' ), 'prod' => 0 ), #... ) ); # Send to stdout if ($argv[1] == '-') { echo $config; # Save to file } else { file_put_contents($argv[1], $config); }