1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/spip_ynh.git synced 2024-09-03 20:25:59 +02:00

Sans with mysql pour vérifier si Linter passe

This commit is contained in:
magikcypress 2017-03-11 00:32:17 +01:00
parent 3e35c5e57d
commit 3c207dbe11

View file

@ -14,7 +14,7 @@ source /usr/share/yunohost/helpers
domain=$(ynh_app_setting_get $app domain) domain=$(ynh_app_setting_get $app domain)
path=$(ynh_app_setting_get $app path) path=$(ynh_app_setting_get $app path)
is_public=$(ynh_app_setting_get $app is_public) is_public=$(ynh_app_setting_get $app is_public)
with_mysql=$(ynh_app_setting_get "$app" with_mysql) # with_mysql=$(ynh_app_setting_get "$app" with_mysql)
# Check domain/path availability # Check domain/path availability
sudo yunohost app checkurl "${domain}${path}" -a "$app" \ sudo yunohost app checkurl "${domain}${path}" -a "$app" \
@ -49,7 +49,7 @@ sudo cp -a ./sources "$final_path"
sudo chown -R www-data: $final_path sudo chown -R www-data: $final_path
# Restore db # Restore db
if [[ $with_mysql -eq 1 ]]; then # if [[ $with_mysql -eq 1 ]]; then
db_pwd=$(ynh_app_setting_get $app mysqlpwd) db_pwd=$(ynh_app_setting_get $app mysqlpwd)
db_user=$app db_user=$app
ynh_mysql_create_db $db_user $db_user $db_pwd ynh_mysql_create_db $db_user $db_user $db_pwd
@ -59,7 +59,7 @@ if [[ $with_mysql -eq 1 ]]; then
# sudo sed -i -e "s/'__DB_PWD__', *'[^']*'/'__DB_PWD__', '$app'/g" $final_path/config/connect.php # sudo sed -i -e "s/'__DB_PWD__', *'[^']*'/'__DB_PWD__', '$app'/g" $final_path/config/connect.php
sudo sed -i "s@__DB_USER__@$db_user@g" $final_path/config/connect.php sudo sed -i "s@__DB_USER__@$db_user@g" $final_path/config/connect.php
sudo sed -i "s@__DB_PWD__@$db_pwd@g" $final_path/config/connect.php sudo sed -i "s@__DB_PWD__@$db_pwd@g" $final_path/config/connect.php
fi # fi
# Restore nginx configuration files # Restore nginx configuration files
sudo cp -a ./nginx.conf "$nginx_conf" sudo cp -a ./nginx.conf "$nginx_conf"