Browse Source

fix: missing quotes in shell

master
dnomd343 3 years ago
parent
commit
14d91bded5
  1. 6
      encryption365.php
  2. 6
      run.sh

6
encryption365.php

@ -448,8 +448,8 @@ class Certificate {
public static function saveCert($host, $certInfo) {
$info = Storage::getInfo($host);
$cert = $certInfo['cert_code'];
$caCert = $certInfo['ca_code'];
$cert = trim($certInfo['cert_code']);
$caCert = trim($certInfo['ca_code']);
$startTime = $certInfo['created_at'];
$endTime = $certInfo['expire_at'];
$info['status'] = 'issued';
@ -879,7 +879,7 @@ class InstallCtr {
if (isset($info[$field]) && $info[$field] !== '') {
switch ($field) {
case 'fullchain':
$content = Storage::getCert($host) . Storage::getCaCert($host);
$content = Storage::getCert($host) . PHP_EOL . Storage::getCaCert($host);
break;
case 'key':
$content = Storage::getPrivkey($host);

6
run.sh

@ -1 +1,5 @@
php /etc/encryption365/encryption365.php $*
cmd="php /etc/encryption365/encryption365.php "
for i in "$@"; do
cmd="$cmd '$i'"
done
eval $cmd

Loading…
Cancel
Save