diff --git a/bin/letsencrypt b/bin/letsencrypt index 4730130..f3b9d62 100644 --- a/bin/letsencrypt +++ b/bin/letsencrypt @@ -78,6 +78,8 @@ $config['certs'] = $config['storage'] . '/certs/' . $dir; putenv('USER=' . $config['cpanel']['user']); putenv('PASS=' . $config['cpanel']['password']); +if($config['cpanel']['token']) + putenv('TOKEN=' . $config['cpanel']['token']); // insert custom nameserver into 'acme issue' command // find resolve command, insert or replace nameserver if defined, remove otherwise @@ -99,7 +101,7 @@ file_put_contents($path, $content); Command::$aliases = [ 'acme' => $config['base'] . '/bin/acme', - 'sslic' => $config['base'] . '/vendor/neurobin/sslic/sslic.php', + 'sslic' => $config['base'] . '/vendor/ronindesign/sslic/sslic.php', ]; Command::$defaults = [ diff --git a/composer.json b/composer.json index 0e63f19..a3d0db8 100644 --- a/composer.json +++ b/composer.json @@ -12,20 +12,12 @@ ], "repositories": [ { - "type": "package", - "package": { - "name": "neurobin/sslic", - "version": "0.0.2", - "source": { - "url": "https://github.com/neurobin/sslic.git", - "type": "git", - "reference": "master" - } - } + "type": "vcs", + "url": "https://github.com/ronindesign/sslic" } ], "require": { - "neurobin/sslic": "*", + "ronindesign/sslic": "dev-master", "kelunik/acme-client": "^0.2.13" }, "autoload": { diff --git a/composer.lock b/composer.lock index 6759a86..9a1bc1f 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "03fec5944d0beb6691cc38309a34e0a8", - "content-hash": "da879500ed921a392aaa6979a05f572e", + "hash": "9d6a5a6673e5f876528fee795b59d3c4", + "content-hash": "8645a65c451d1f992df4d53451dc8013", "packages": [ { "name": "amphp/amp", @@ -66,16 +66,16 @@ }, { "name": "amphp/artax", - "version": "v2.0.5", + "version": "v2.0.7", "source": { "type": "git", "url": "https://github.com/amphp/artax.git", - "reference": "1795ed4076469546f79804b348ffd6dd77656f73" + "reference": "79d897c6c9616aaf74ce69027d3b8e9a176455c3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/artax/zipball/1795ed4076469546f79804b348ffd6dd77656f73", - "reference": "1795ed4076469546f79804b348ffd6dd77656f73", + "url": "https://api.github.com/repos/amphp/artax/zipball/79d897c6c9616aaf74ce69027d3b8e9a176455c3", + "reference": "79d897c6c9616aaf74ce69027d3b8e9a176455c3", "shasum": "" }, "require": { @@ -120,7 +120,7 @@ "parallel", "rest" ], - "time": "2016-08-08 16:27:01" + "time": "2017-07-13 19:47:16" }, { "name": "amphp/cache", @@ -172,16 +172,16 @@ }, { "name": "amphp/dns", - "version": "v0.8.13", + "version": "v0.8.15", "source": { "type": "git", "url": "https://github.com/amphp/dns.git", - "reference": "fc4621dfb74b36784ac482fd77d8f8f49c6bf2c7" + "reference": "70441dab2086dc3d627a593a9c022d3959130eba" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/dns/zipball/fc4621dfb74b36784ac482fd77d8f8f49c6bf2c7", - "reference": "fc4621dfb74b36784ac482fd77d8f8f49c6bf2c7", + "url": "https://api.github.com/repos/amphp/dns/zipball/70441dab2086dc3d627a593a9c022d3959130eba", + "reference": "70441dab2086dc3d627a593a9c022d3959130eba", "shasum": "" }, "require": { @@ -238,7 +238,7 @@ "dns", "resolve" ], - "time": "2017-01-25 15:25:41" + "time": "2017-07-12 16:03:14" }, { "name": "amphp/file", @@ -528,11 +528,17 @@ }, { "name": "kelunik/acme-client", - "version": "v0.2.13", + "version": "v0.2.14", "source": { "type": "git", "url": "https://github.com/kelunik/acme-client.git", - "reference": "6a2635f18543574dae1e423e87b81e578008e529" + "reference": "f4cabf755b0615ef1e33a0efbbfdeb2a8081cc33" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/kelunik/acme-client/zipball/f4cabf755b0615ef1e33a0efbbfdeb2a8081cc33", + "reference": "f4cabf755b0615ef1e33a0efbbfdeb2a8081cc33", + "shasum": "" }, "require": { "amphp/process": "^0.1.1", @@ -584,6 +590,7 @@ "src/functions.php" ] }, + "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], @@ -603,20 +610,20 @@ "ssl", "tls" ], - "time": "2017-01-05 01:20:47" + "time": "2017-05-10 08:22:51" }, { "name": "kelunik/certificate", - "version": "v1.0.0", + "version": "v1.1.1", "source": { "type": "git", "url": "https://github.com/kelunik/certificate.git", - "reference": "b4ea243fbedc56813c74ba5b00bf8c69c6892a80" + "reference": "524fa432ed1b5f50efbe7749f3c19e28a9866bc7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/kelunik/certificate/zipball/b4ea243fbedc56813c74ba5b00bf8c69c6892a80", - "reference": "b4ea243fbedc56813c74ba5b00bf8c69c6892a80", + "url": "https://api.github.com/repos/kelunik/certificate/zipball/524fa432ed1b5f50efbe7749f3c19e28a9866bc7", + "reference": "524fa432ed1b5f50efbe7749f3c19e28a9866bc7", "shasum": "" }, "require": { @@ -652,7 +659,7 @@ "pem", "x509" ], - "time": "2016-01-27 08:46:30" + "time": "2017-07-04 19:37:30" }, { "name": "league/climate", @@ -765,28 +772,18 @@ ], "time": "2016-01-24 11:10:26" }, - { - "name": "neurobin/sslic", - "version": "0.0.2", - "source": { - "type": "git", - "url": "https://github.com/neurobin/sslic.git", - "reference": "master" - }, - "type": "library" - }, { "name": "phpseclib/phpseclib", - "version": "2.0.4", + "version": "2.0.9", "source": { "type": "git", "url": "https://github.com/phpseclib/phpseclib.git", - "reference": "ab8028c93c03cc8d9c824efa75dc94f1db2369bf" + "reference": "c9a3fe35e20eb6eeaca716d6a23cde03f52d1558" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/ab8028c93c03cc8d9c824efa75dc94f1db2369bf", - "reference": "ab8028c93c03cc8d9c824efa75dc94f1db2369bf", + "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/c9a3fe35e20eb6eeaca716d6a23cde03f52d1558", + "reference": "c9a3fe35e20eb6eeaca716d6a23cde03f52d1558", "shasum": "" }, "require": { @@ -865,20 +862,20 @@ "x.509", "x509" ], - "time": "2016-10-04 00:57:04" + "time": "2017-11-29 06:38:08" }, { "name": "rdlowrey/auryn", - "version": "v1.4.0", + "version": "v1.4.2", "source": { "type": "git", "url": "https://github.com/rdlowrey/auryn.git", - "reference": "2e4240791162dfe073d59654d8dc06df0eb0b73f" + "reference": "8c4dc07943599ba84f4f89eab8cf43efeef80395" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/rdlowrey/auryn/zipball/2e4240791162dfe073d59654d8dc06df0eb0b73f", - "reference": "2e4240791162dfe073d59654d8dc06df0eb0b73f", + "url": "https://api.github.com/repos/rdlowrey/auryn/zipball/8c4dc07943599ba84f4f89eab8cf43efeef80395", + "reference": "8c4dc07943599ba84f4f89eab8cf43efeef80395", "shasum": "" }, "require": { @@ -926,27 +923,66 @@ "dic", "ioc" ], - "time": "2016-03-14 20:10:19" + "time": "2017-05-15 06:26:46" + }, + { + "name": "ronindesign/sslic", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/ronindesign/sslic.git", + "reference": "cca30bfb86b736888875ed7f04f7df1b9c51eaf4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ronindesign/sslic/zipball/cca30bfb86b736888875ed7f04f7df1b9c51eaf4", + "reference": "cca30bfb86b736888875ed7f04f7df1b9c51eaf4", + "shasum": "" + }, + "type": "library", + "license": [ + "GPL-3.0" + ], + "authors": [ + { + "name": "Ronin Design", + "homepage": "https://github.com/ronindesign" + } + ], + "description": "SSL certificate installer for Cpanel", + "homepage": "https://github.com/ronindesign/sslic", + "keywords": [ + "certificate", + "cpanel", + "letsencrypt", + "shared hosting", + "ssl", + "whm" + ], + "support": { + "source": "https://github.com/ronindesign/sslic/tree/master" + }, + "time": "2017-12-22 13:27:48" }, { "name": "sabre/uri", - "version": "1.2.0", + "version": "1.2.1", "source": { "type": "git", - "url": "https://github.com/fruux/sabre-uri.git", - "reference": "8545a3335f741d4b7700bb14efb41b4c03775dcd" + "url": "https://github.com/sabre-io/uri.git", + "reference": "ada354d83579565949d80b2e15593c2371225e61" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/fruux/sabre-uri/zipball/8545a3335f741d4b7700bb14efb41b4c03775dcd", - "reference": "8545a3335f741d4b7700bb14efb41b4c03775dcd", + "url": "https://api.github.com/repos/sabre-io/uri/zipball/ada354d83579565949d80b2e15593c2371225e61", + "reference": "ada354d83579565949d80b2e15593c2371225e61", "shasum": "" }, "require": { "php": ">=5.4.7" }, "require-dev": { - "phpunit/phpunit": "*", + "phpunit/phpunit": ">=4.0,<6.0", "sabre/cs": "~1.0.0" }, "type": "library", @@ -977,20 +1013,20 @@ "uri", "url" ], - "time": "2016-12-07 01:17:59" + "time": "2017-02-20 19:59:28" }, { "name": "seld/cli-prompt", - "version": "1.0.2", + "version": "1.0.3", "source": { "type": "git", "url": "https://github.com/Seldaek/cli-prompt.git", - "reference": "8cbe10923cae5bcd7c5a713f6703fc4727c8c1b4" + "reference": "a19a7376a4689d4d94cab66ab4f3c816019ba8dd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/cli-prompt/zipball/8cbe10923cae5bcd7c5a713f6703fc4727c8c1b4", - "reference": "8cbe10923cae5bcd7c5a713f6703fc4727c8c1b4", + "url": "https://api.github.com/repos/Seldaek/cli-prompt/zipball/a19a7376a4689d4d94cab66ab4f3c816019ba8dd", + "reference": "a19a7376a4689d4d94cab66ab4f3c816019ba8dd", "shasum": "" }, "require": { @@ -1025,20 +1061,20 @@ "input", "prompt" ], - "time": "2016-04-18 09:31:41" + "time": "2017-03-18 11:32:45" }, { "name": "symfony/polyfill-php56", - "version": "v1.3.0", + "version": "v1.6.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php56.git", - "reference": "1dd42b9b89556f18092f3d1ada22cb05ac85383c" + "reference": "265fc96795492430762c29be291a371494ba3a5b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php56/zipball/1dd42b9b89556f18092f3d1ada22cb05ac85383c", - "reference": "1dd42b9b89556f18092f3d1ada22cb05ac85383c", + "url": "https://api.github.com/repos/symfony/polyfill-php56/zipball/265fc96795492430762c29be291a371494ba3a5b", + "reference": "265fc96795492430762c29be291a371494ba3a5b", "shasum": "" }, "require": { @@ -1048,7 +1084,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3-dev" + "dev-master": "1.6-dev" } }, "autoload": { @@ -1081,20 +1117,20 @@ "portable", "shim" ], - "time": "2016-11-14 01:06:16" + "time": "2017-10-11 12:05:26" }, { "name": "symfony/polyfill-util", - "version": "v1.3.0", + "version": "v1.6.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-util.git", - "reference": "746bce0fca664ac0a575e465f65c6643faddf7fb" + "reference": "6e719200c8e540e0c0effeb31f96bdb344b94176" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-util/zipball/746bce0fca664ac0a575e465f65c6643faddf7fb", - "reference": "746bce0fca664ac0a575e465f65c6643faddf7fb", + "url": "https://api.github.com/repos/symfony/polyfill-util/zipball/6e719200c8e540e0c0effeb31f96bdb344b94176", + "reference": "6e719200c8e540e0c0effeb31f96bdb344b94176", "shasum": "" }, "require": { @@ -1103,7 +1139,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3-dev" + "dev-master": "1.6-dev" } }, "autoload": { @@ -1133,27 +1169,30 @@ "polyfill", "shim" ], - "time": "2016-11-14 01:06:16" + "time": "2017-10-11 12:05:26" }, { "name": "symfony/yaml", - "version": "v3.2.2", + "version": "v3.4.2", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "50eadbd7926e31842893c957eca362b21592a97d" + "reference": "afe0cd38486505c9703707707d91450cfc1bd536" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/50eadbd7926e31842893c957eca362b21592a97d", - "reference": "50eadbd7926e31842893c957eca362b21592a97d", + "url": "https://api.github.com/repos/symfony/yaml/zipball/afe0cd38486505c9703707707d91450cfc1bd536", + "reference": "afe0cd38486505c9703707707d91450cfc1bd536", "shasum": "" }, "require": { - "php": ">=5.5.9" + "php": "^5.5.9|>=7.0.8" + }, + "conflict": { + "symfony/console": "<3.4" }, "require-dev": { - "symfony/console": "~2.8|~3.0" + "symfony/console": "~3.4|~4.0" }, "suggest": { "symfony/console": "For validating YAML files using the lint command" @@ -1161,7 +1200,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.2-dev" + "dev-master": "3.4-dev" } }, "autoload": { @@ -1188,7 +1227,7 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "time": "2017-01-03 13:51:32" + "time": "2017-12-11 20:38:23" }, { "name": "webmozart/assert", @@ -1244,7 +1283,9 @@ "packages-dev": [], "aliases": [], "minimum-stability": "stable", - "stability-flags": [], + "stability-flags": { + "ronindesign/sslic": 20 + }, "prefer-stable": false, "prefer-lowest": false, "platform": [], diff --git a/config.yml.example b/config.yml.example index 06f1c6a..4e7c659 100644 --- a/config.yml.example +++ b/config.yml.example @@ -1,4 +1,4 @@ -# Base directory for domain paths +# Base directory for domain paths. home: /home/user # Server to use. URL to the ACME directory. @@ -14,7 +14,7 @@ renew: 30 # List of certificates to issue. certificates: # For each certificate, there are a few options. - # bits: Number of bits for the domain private key + # bits: Number of bits for the domain private key. # domains: Map of document roots to domains. Maps each path to one or multiple # domains. If one domain is given, it's automatically converted to an # array. The first domain will be the common name. @@ -31,9 +31,12 @@ certificates: notify: me@example.com # CPanel credentials. +# Token access only available with WHM access. +# Regular 'shared hosting' cpanel account do not have this option. cpanel: user: example password: secret +# token: WHMTOKENGENERATED # List of domains for which certificates will be installed in cpanel. # The www prefix should be omitted as it is trimmed for installation. @@ -42,6 +45,6 @@ install: blacklist: - sub.example.com -# Custom nameserver ip used by "acme issue" command -# For example google public dns "8.8.8.8" or "8.8.4.4" +# Custom nameserver ip used by "acme issue" command. +# For example google public dns "8.8.8.8" or "8.8.4.4". nameserver: false