fix(install) : first copy files for herse and less strange password char

This commit is contained in:
mrflos 2023-02-03 21:36:26 +03:00
parent 2eb1df3908
commit e85763f991
2 changed files with 19 additions and 2 deletions

View file

@ -73,7 +73,7 @@ function generatePassword($length = 32, $add_dashes = false, $available_sets = '
$sets[] = '23456789';
}
if (strpos($available_sets, 's') !== false) {
$sets[] = ';()!@#$&*?';
$sets[] = ';-().!?';
}
$all = '';
@ -248,3 +248,20 @@ function checkHerse($herseUser, $hersePass)
}
return true; // herse needed
}
function editConfigFile() {
// change fuseau horaire
// 'contact_mail_func' => 'smtp',
// 'contact_smtp_host' => 'ssl://mail.gandi.net',
// 'contact_smtp_port' => '465',
// 'contact_smtp_user' => 'noreply@yeswiki.pro',
// 'contact_reply_to' => 'noreply@yeswiki.pro',
// 'contact_smtp_pass' => 'Ceci est 1 message automatique!',
}
function addStatistics() {
// requete SQL
// INSERT INTO `matomo_site` (`idsite`, `name`, `main_url`, `ts_created`, `ecommerce`, `sitesearch`, `sitesearch_keyword_parameters`, `sitesearch_category_parameters`, `timezone`, `currency`, `exclude_unknown_urls`, `excluded_ips`, `excluded_parameters`, `excluded_user_agents`, `excluded_referrers`, `group`, `type`, `keep_url_fragment`, `creator_login`) VALUES (NULL, 'Partage ton outil', 'https://partagetonoutil.fr', '2023-02-01 00:00:00', '0', '1', '', '', 'Europe/Paris', 'EUR', '0', '', '', '', '', '', 'website', '0', 'superadmin');
}

View file

@ -76,9 +76,9 @@ if (0 == posix_getuid()) {
if ($confirm || $input->confirmed()) {
$unixUser = createUnixUserWithQuota($user, $quota);
$dbUser = createSQLUserAndDatabase($user, $type);
copyYesWikiFiles($domain, $user, $dbUser);
createNginxConfig($domain, $user, $herseUser, $hersePass);
createPhpFpmConfig($user);
copyYesWikiFiles($domain, $user, $dbUser);
$climate->shout(
'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"