mirror of
https://github.com/YunoHost-Apps/codimd_ynh.git
synced 2024-09-03 18:16:32 +02:00
fix conf
This commit is contained in:
parent
fc743b06f9
commit
c53e59eaf8
3 changed files with 31 additions and 31 deletions
|
@ -115,16 +115,16 @@ ynh_backup_if_checksum_is_different --file="$final_path/config.json"
|
|||
domain=$new_domain
|
||||
path_url=$new_path
|
||||
|
||||
ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="../conf/config.json.example"
|
||||
ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file="../conf/config.json.example"
|
||||
ynh_replace_string --match_string="__PATH__" --replace_string="${path_url:1}" --target_file="../conf/config.json.example"
|
||||
ynh_replace_string --match_string="__DB_USER__" --replace_string="$db_user" --target_file="../conf/config.json.example"
|
||||
ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="../conf/config.json.example"
|
||||
ynh_replace_string --match_string="__DB_PASS__" --replace_string="$db_pwd" --target_file="../conf/config.json.example"
|
||||
ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="../conf/config.json.example"
|
||||
|
||||
cp ../conf/config.json.example "$final_path/config.json"
|
||||
|
||||
ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="$final_path/config.json"
|
||||
ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file="$final_path/config.json"
|
||||
ynh_replace_string --match_string="__PATH__" --replace_string="$path_url" --target_file="$final_path/config.json"
|
||||
ynh_replace_string --match_string="__DB_USER__" --replace_string="$db_user" --target_file="$final_path/config.json"
|
||||
ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="$final_path/config.json"
|
||||
ynh_replace_string --match_string="__DB_PASS__" --replace_string="$db_pwd" --target_file="$final_path/config.json"
|
||||
ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="$final_path/config.json"
|
||||
|
||||
ynh_store_file_checksum --file="$final_path/config.json"
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -143,26 +143,26 @@ ynh_add_systemd_config
|
|||
#=================================================
|
||||
ynh_script_progression --message="Modifying a config file..."
|
||||
|
||||
# Main config File
|
||||
ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="../conf/config.json.example"
|
||||
ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file="../conf/config.json.example"
|
||||
ynh_replace_string --match_string="__PATH__" --replace_string="${path_url:1}" --target_file="../conf/config.json.example"
|
||||
ynh_replace_string --match_string="__DB_USER__" --replace_string="$db_user" --target_file="../conf/config.json.example"
|
||||
ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="../conf/config.json.example"
|
||||
ynh_replace_string --match_string="__DB_PASS__" --replace_string="$db_pwd" --target_file="../conf/config.json.example"
|
||||
ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="../conf/config.json.example"
|
||||
|
||||
cp ../conf/config.json.example "$final_path/config.json"
|
||||
|
||||
# Main config File
|
||||
ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="$final_path/config.json"
|
||||
ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file="$final_path/config.json"
|
||||
ynh_replace_string --match_string="__PATH__" --replace_string="$path_url" --target_file="$final_path/config.json"
|
||||
ynh_replace_string --match_string="__DB_USER__" --replace_string="$db_user" --target_file="$final_path/config.json"
|
||||
ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="$final_path/config.json"
|
||||
ynh_replace_string --match_string="__DB_PASS__" --replace_string="$db_pwd" --target_file="$final_path/config.json"
|
||||
ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="$final_path/config.json"
|
||||
|
||||
ynh_store_file_checksum --file="$final_path/config.json"
|
||||
|
||||
# DB Config File
|
||||
ynh_replace_string --match_string="__DB_USER__" --replace_string="$db_user" --target_file="../conf/.sequelizerc.example"
|
||||
ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="../conf/.sequelizerc.example"
|
||||
ynh_replace_string --match_string="__DB_PASS__" --replace_string="$db_pwd" --target_file="../conf/.sequelizerc.example"
|
||||
|
||||
cp ../conf/.sequelizerc.example "$final_path/.sequelizerc"
|
||||
|
||||
# DB Config File
|
||||
ynh_replace_string --match_string="__DB_USER__" --replace_string="$db_user" --target_file="$final_path/.sequelizerc"
|
||||
ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="$final_path/.sequelizerc"
|
||||
ynh_replace_string --match_string="__DB_PASS__" --replace_string="$db_pwd" --target_file="$final_path/.sequelizerc"
|
||||
|
||||
ynh_store_file_checksum --file="$final_path/.sequelizerc"
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -139,17 +139,17 @@ ynh_script_progression --message="Modifying a config file..." --weight=2
|
|||
|
||||
ynh_backup_if_checksum_is_different --file="$final_path/config.json"
|
||||
|
||||
# Main config File
|
||||
ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="../conf/config.json.example"
|
||||
ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file="../conf/config.json.example"
|
||||
ynh_replace_string --match_string="__PATH__" --replace_string="${path_url:1}" --target_file="../conf/config.json.example"
|
||||
ynh_replace_string --match_string="__DB_USER__" --replace_string="$db_user" --target_file="../conf/config.json.example"
|
||||
ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="../conf/config.json.example"
|
||||
ynh_replace_string --match_string="__DB_PASS__" --replace_string="$db_pwd" --target_file="../conf/config.json.example"
|
||||
ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="../conf/config.json.example"
|
||||
|
||||
cp ../conf/config.json.example "$final_path/config.json"
|
||||
|
||||
# Main config File
|
||||
ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="$final_path/config.json"
|
||||
ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file="$final_path/config.json"
|
||||
ynh_replace_string --match_string="__PATH__" --replace_string="$path_url" --target_file="$final_path/config.json"
|
||||
ynh_replace_string --match_string="__DB_USER__" --replace_string="$db_user" --target_file="$final_path/config.json"
|
||||
ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="$final_path/config.json"
|
||||
ynh_replace_string --match_string="__DB_PASS__" --replace_string="$db_pwd" --target_file="$final_path/config.json"
|
||||
ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="$final_path/config.json"
|
||||
|
||||
# Recalculate and store the checksum of the file for the next upgrade.
|
||||
ynh_store_file_checksum --file="$final_path/config.json"
|
||||
|
||||
|
|
Loading…
Reference in a new issue