1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/ampache_ynh.git synced 2024-09-03 18:15:55 +02:00

Update install

This commit is contained in:
ericgaspar 2021-03-17 22:35:22 +01:00
parent 743ef63882
commit 91e54cc835
No known key found for this signature in database
GPG key ID: 574F281483054D44

View file

@ -106,20 +106,24 @@ ynh_add_fpm_config --usage=low --footprint=low --package="$extra_php_dependencie
#=================================================
ynh_script_progression --message="Preconfiguring Ampache..." --weight=2
conf_file="$final_path/config/ampache.cfg.php"
cp ../conf/ampache.cfg.php "$conf_file"
ynh_replace_string --match_string="__DB_USER__" --replace_string="$db_user" --target_file="$conf_file"
ynh_replace_string --match_string="__DB_PWD__" --replace_string="$db_pwd" --target_file="$conf_file"
ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="$conf_file"
ynh_replace_string --match_string="__PATHTOCHANGE__" --replace_string="$path_url" --target_file="$conf_file"
ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file="$conf_file"
secret_key=$(ynh_string_random --length=24)
ynh_replace_string --match_string="__RANDOMKEYTOCHANGE__" --replace_string="$secret_key" --target_file="$conf_file"
ynh_app_setting_set --app=$app --key=secret_key --value=$secret_key
# Calculate and store the config file checksum into the app settings
ynh_store_file_checksum --file="$conf_file"
# conf_file="$final_path/config/ampache.cfg.php"
# cp ../conf/ampache.cfg.php "$conf_file"
# ynh_replace_string --match_string="__DB_USER__" --replace_string="$db_user" --target_file="$conf_file"
# ynh_replace_string --match_string="__DB_PWD__" --replace_string="$db_pwd" --target_file="$conf_file"
# ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="$conf_file"
# ynh_replace_string --match_string="__PATH__" --replace_string="$path_url" --target_file="$conf_file"
# ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file="$conf_file"
# ynh_replace_string --match_string="__SECRET_KEY__" --replace_string="$secret_key" --target_file="$conf_file"
# # Calculate and store the config file checksum into the app settings
# ynh_store_file_checksum --file="$conf_file"
ynh_add_config --template="../conf/ampache.cfg.php" --destination="$final_path/config/ampache.cfg.php"
#=================================================
# LOAD DEFAULT DATABASE