mirror of
https://github.com/YunoHost-Apps/ttrss_ynh.git
synced 2024-10-01 13:34:46 +02:00
Add ynh_add_config
This commit is contained in:
parent
ce33f37c6a
commit
9f7880e017
2 changed files with 4 additions and 21 deletions
|
@ -97,15 +97,8 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
|
|||
#=================================================
|
||||
ynh_script_progression --message="Configuring ttrss..." --weight=1
|
||||
|
||||
cp ../conf/config.php "$final_path/config.php"
|
||||
|
||||
# Change variables in ttrss configuration
|
||||
ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="$final_path/config.php"
|
||||
ynh_replace_string --match_string="__DB_PWD__" --replace_string="$db_pwd" --target_file="$final_path/config.php"
|
||||
ynh_replace_string --match_string="__DOMAIN_PATH__" --replace_string="https://$domain$path_url" --target_file="$final_path/config.php"
|
||||
|
||||
# Recalculate and store the config file checksum into the app settings
|
||||
ynh_store_file_checksum --file="$final_path/config.php"
|
||||
domain_path=$(https://$domain$path_url)
|
||||
ynh_add_config --template="../conf/config.php" --destination="$final_path/config.php"
|
||||
|
||||
#=================================================
|
||||
# SETUP SYSTEMD
|
||||
|
|
|
@ -127,18 +127,8 @@ then
|
|||
mv "$tmpdir" "$final_path"
|
||||
ynh_secure_remove --file="$tmpdir"
|
||||
|
||||
# Verify the checksum and backup the file if it's different
|
||||
ynh_backup_if_checksum_is_different --file="$final_path/config.php"
|
||||
|
||||
cp ../conf/config.php "$final_path/config.php"
|
||||
|
||||
# Change variables in ttrss configuration
|
||||
ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="$final_path/config.php"
|
||||
ynh_replace_string --match_string="__DB_PWD__" --replace_string="$db_pwd" --target_file="$final_path/config.php"
|
||||
ynh_replace_string --match_string="__DOMAIN_PATH__" --replace_string="https://$domain$path_url" --target_file="$final_path/config.php"
|
||||
|
||||
# Recalculate and store the config file checksum into the app settings
|
||||
ynh_store_file_checksum --file="$final_path/config.php"
|
||||
domain_path=$(https://$domain$path_url)
|
||||
ynh_add_config --template="../conf/config.php" --destination="$final_path/config.php"
|
||||
|
||||
#=================================================
|
||||
# UPGRADE DATABASE
|
||||
|
|
Loading…
Add table
Reference in a new issue