Created
December 15, 2015 19:47
-
-
Save daronspence/11cb368a7b8d3d521647 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// https://github.com/daverogers/serverpilot-php | |
require_once('serverpilot-php/lib/ServerPilot.php'); | |
$clientid = "cid_XXXXXXXXX"; | |
$apikey = "XXXXXXXXXXXXXX"; | |
$appid = "XXXXXXXXXX"; | |
$priv = trim(file_get_contents('/etc/letsencrypt/live/DOMAINNAME/privkey.pem')); | |
$cert = trim(file_get_contents('/etc/letsencrypt/live/DOMAINNAME/fullchain.pem')); | |
$config = array( | |
'id' => $clientid, | |
'key' => $apikey | |
); | |
$sp = new ServerPilot($config); | |
$sslkey = $priv; | |
$sslcert = $cert; | |
// var_dump($sslcert); | |
$apps = $sp->app_info($appid); | |
$wikissl = $sp->ssl_add($appid, $sslkey, $sslcert, null); | |
var_dump($wikissl); | |
// var_dump($apps); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment