fix(install) : certificate and move doryphore folder

This commit is contained in:
mrflos 2023-02-01 16:35:45 +03:00
parent dc280fa089
commit 286a5dafc2

View file

@ -168,7 +168,7 @@ function createNginxConfig($domain, $user, $herseUser, $hersePass)
)
);
exec('service nginx force-reload', $output);
exec('/root/.acme.sh/acme.sh --issue -d '.$domain.' -d www.'.$domain.' -k ec-384 --nginx', $output);
exec('/root/.acme.sh/acme.sh --issue -d '.$domain.' -d www.'.$domain.' -k ec-384 -w /home/'.$user.'/'.$domain.'/', $output);
exec('mkdir -p /etc/letsencrypt/live/'.$domain, $output);
exec('/root/.acme.sh/acme.sh --install-cert -d '.$domain.' --ecc \
--cert-file /etc/letsencrypt/live/'.$domain.'/cert.pem \
@ -229,6 +229,8 @@ function copyYesWikiFiles($domain, $user, $dbUser)
}
exec($sudo.'curl -o '.$tmpFile.' '.$_SERVER['source_archive_url']);
exec($sudo.'unzip '.$tmpFile.' "doryphore/*" -d '.$destDir);
exec($sudo.'mv '.$destDir.'/doryphore/* -d '.$destDir.'/');
exec($sudo.'rm -rf '.$destDir.'/doryphore');
unlink($tmpFile);
exec($sudo.'curl -X POST "https://'.$domain.'/?PagePrincipale&installAction=install" -F "config[default_language]=fr" -F "config[wakka_name]='.$domain.'" \