From 9063b79bb19cffbeb873a51839da7ed1cafd94ce Mon Sep 17 00:00:00 2001 From: polytan02 Date: Sat, 7 Mar 2015 13:55:18 +0000 Subject: [PATCH] Password for phpBB MySQL database --- manifest.json | 11 ++++++++++- scripts/install | 5 +++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/manifest.json b/manifest.json index 3ead178..8074d34 100644 --- a/manifest.json +++ b/manifest.json @@ -40,7 +40,16 @@ }, "choices": ["Yes", "No"], "default": "Yes" - } + }, + { + "name": "dp_pwd", + "type": "password", + "ask": { + "en": "Choose a password for phpBB MySQL database", + "fr": "Choisissez un mot de passe pour la base MySQL de phpBB" + }, + "example": "my_strong_password" + } ] } } diff --git a/scripts/install b/scripts/install index 5f21925..35c18d8 100644 --- a/scripts/install +++ b/scripts/install @@ -14,7 +14,8 @@ if [[ ! $? -eq 0 ]]; then fi db_user=$app -db_pwd=$(dd if=/dev/urandom bs=1 count=200 2> /dev/null | tr -c -d '[A-Za-z0-9]' | sed -n 's/\(.\{24\}\).*/\1/p') +#db_pwd=$(dd if=/dev/urandom bs=1 count=200 2> /dev/null | tr -c -d '[A-Za-z0-9]' | sed -n 's/\(.\{24\}\).*/\1/p') +db_pwd=$4 # Initialize database and store mysql password for upgrade #sudo yunohost app initdb $db_user -p $db_pwd -s $(readlink -e ../sources/SQL/mysql.initial.sql) @@ -25,7 +26,7 @@ sudo yunohost app setting $app mysqlpwd -v $db_pwd final_path=/var/www/$app sudo rm -rf $final_path sudo mkdir -p $final_path -sudo cp -a ../sources/* $final_path +sudo cp -a ../sources/phpBB/* $final_path # Set permissions to rainloop directory