fix(install) : make nginx and php configs before copying files
This commit is contained in:
parent
c0e1e484f0
commit
be58ef520e
2 changed files with 1 additions and 4 deletions
|
@ -233,9 +233,6 @@ function copyYesWikiFiles($domain, $user, $dbUser)
|
||||||
exec($sudo.'rm -rf '.$destDir.'/doryphore');
|
exec($sudo.'rm -rf '.$destDir.'/doryphore');
|
||||||
unlink($tmpFile);
|
unlink($tmpFile);
|
||||||
|
|
||||||
# we wait 10 seconds before launching install
|
|
||||||
echo "\nEn attente de dézippage (10 secondes)\n\n";
|
|
||||||
exec('sleep 10');
|
|
||||||
$curl = 'curl -X POST --insecure --data-urlencode \'config[default_language]=fr\' --data-urlencode \'config[wakka_name]='.$domain.'\' --data-urlencode \'config[root_page]=PagePrincipale\' --data-urlencode \'config[mysql_host]=localhost\' --data-urlencode \'config[mysql_database]='.$dbUser['database'].'\' --data-urlencode \'config[mysql_user]='.$dbUser['user'].'\' --data-urlencode \'config[mysql_password]='.$dbUser['password'].'\' --data-urlencode \'config[table_prefix]=yeswiki_\' --data-urlencode \'admin_name='.$_SERVER['admin_id'].'\' --data-urlencode \'admin_password='.$_SERVER['admin_password'].'\' --data-urlencode \'admin_password_conf='.$_SERVER['admin_password'].'\' --data-urlencode \'admin_email='.$_SERVER['admin_email'].'\' --data-urlencode \'config[rewrite_mode]=1\' --data-urlencode \'submit=Continue\' \'https://'.$domain.'/?PagePrincipale&installAction=install\' 2>&1';
|
$curl = 'curl -X POST --insecure --data-urlencode \'config[default_language]=fr\' --data-urlencode \'config[wakka_name]='.$domain.'\' --data-urlencode \'config[root_page]=PagePrincipale\' --data-urlencode \'config[mysql_host]=localhost\' --data-urlencode \'config[mysql_database]='.$dbUser['database'].'\' --data-urlencode \'config[mysql_user]='.$dbUser['user'].'\' --data-urlencode \'config[mysql_password]='.$dbUser['password'].'\' --data-urlencode \'config[table_prefix]=yeswiki_\' --data-urlencode \'admin_name='.$_SERVER['admin_id'].'\' --data-urlencode \'admin_password='.$_SERVER['admin_password'].'\' --data-urlencode \'admin_password_conf='.$_SERVER['admin_password'].'\' --data-urlencode \'admin_email='.$_SERVER['admin_email'].'\' --data-urlencode \'config[rewrite_mode]=1\' --data-urlencode \'submit=Continue\' \'https://'.$domain.'/?PagePrincipale&installAction=install\' 2>&1';
|
||||||
$output = [];
|
$output = [];
|
||||||
exec($curl, $output);
|
exec($curl, $output);
|
||||||
|
|
|
@ -76,9 +76,9 @@ if (0 == posix_getuid()) {
|
||||||
if ($confirm || $input->confirmed()) {
|
if ($confirm || $input->confirmed()) {
|
||||||
$unixUser = createUnixUserWithQuota($user, $quota);
|
$unixUser = createUnixUserWithQuota($user, $quota);
|
||||||
$dbUser = createSQLUserAndDatabase($user, $type);
|
$dbUser = createSQLUserAndDatabase($user, $type);
|
||||||
copyYesWikiFiles($domain, $user, $dbUser);
|
|
||||||
createNginxConfig($domain, $user, $herseUser, $hersePass);
|
createNginxConfig($domain, $user, $herseUser, $hersePass);
|
||||||
createPhpFpmConfig($user);
|
createPhpFpmConfig($user);
|
||||||
|
copyYesWikiFiles($domain, $user, $dbUser);
|
||||||
$climate->shout(
|
$climate->shout(
|
||||||
'The yeswiki was successfully installed on <bold>'.$domain.'</bold>, congrats ! 🎉'."\n"
|
'The yeswiki was successfully installed on <bold>'.$domain.'</bold>, congrats ! 🎉'."\n"
|
||||||
.' Unix user : <bold>'.$unixUser['user'].'</bold> with password : <bold>'.$unixUser['password'].'</bold> was created.'."\n"
|
.' Unix user : <bold>'.$unixUser['user'].'</bold> with password : <bold>'.$unixUser['password'].'</bold> was created.'."\n"
|
||||||
|
|
Loading…
Reference in a new issue