argument('email'); if (!v::email()->validate($email)) { $this->error('First argument has to be a valid E-Mail! Failed!'); exit(); } $domain = $this->argument('domain'); // adding flags $domainFlags = ''; // add file for domain $saved = []; system('certbot --non-interactive --agree-tos -m '.$this->argument('email').' --nginx -d '.$domain); // check for certificate if (file_exists( '/etc/letsencrypt/live/'.$domain.'/fullchain.pem')) { $this->info($domain.'...Success!'); } else { $this->error($domain.'...Failed!'); } } }