1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/backdrop_ynh.git synced 2024-09-03 20:36:14 +02:00
This commit is contained in:
ericgaspar 2020-10-18 18:01:25 +02:00
parent 4dc536750c
commit 3b2c16c5d9
No known key found for this signature in database
GPG key ID: 574F281483054D44
3 changed files with 14 additions and 12 deletions

View file

@ -80,22 +80,22 @@ fi
#=================================================
# SPECIFIC MODIFICATIONS
#=================================================
ynh_script_progression --message="Configuring $app..." --weight=1
# ynh_script_progression --message="Configuring $app..." --weight=1
domain="$new_domain"
path_url="$new_path"
# domain="$new_domain"
# path_url="$new_path"
ynh_backup_if_checksum_is_different --file="$final_path/settings.php"
# ynh_backup_if_checksum_is_different --file="$final_path/settings.php"
cp ../conf/settings.php "$final_path/settings.php"
# cp ../conf/settings.example.php "$final_path/settings.php"
# Change domain name in config.php
ynh_replace_string --match_string="__DBNAME__" --replace_string="$db_name" --target_file="$final_path/settings.php"
ynh_replace_string --match_string="__DBPWD__" --replace_string="$db_pwd" --target_file="$final_path/settings.php"
ynh_replace_string --match_string="__DOMAINPATH__" --replace_string="https://$domain$path_url" --target_file="$final_path/settings.php"
# # Change domain name in config.php
# ynh_replace_string --match_string="__DBNAME__" --replace_string="$db_name" --target_file="$final_path/settings.php"
# ynh_replace_string --match_string="__DBPWD__" --replace_string="$db_pwd" --target_file="$final_path/settings.php"
# #ynh_replace_string --match_string="__DOMAINPATH__" --replace_string="https://$domain$path_url" --target_file="$final_path/settings.php"
# Recalculate and store the config file checksum into the app settings
ynh_store_file_checksum --file="$final_path/settings.php"
# # Recalculate and store the config file checksum into the app settings
# ynh_store_file_checksum --file="$final_path/settings.php"
#=================================================
# GENERIC FINALIZATION

View file

@ -101,7 +101,7 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
#=================================================
ynh_script_progression --message="Configuring Backdrop..." --weight=1
cp ../conf/settings.php "$final_path/settings.php"
cp ../conf/settings.example.php "$final_path/settings.php"
# Change variables in ttrss configuration
ynh_replace_string --match_string="__DBNAME__" --replace_string="$db_name" --target_file="$final_path/settings.php"

View file

@ -67,6 +67,8 @@ ynh_system_user_create --username=$app
# Set permissions to app files
chown -R root: $final_path
chown -R $app:www-data $final_path/files
chmod -R 770 $final_path/files
#=================================================
# RESTORE THE PHP-FPM CONFIGURATION