mirror of
https://github.com/YunoHost-Apps/hedgedoc_ynh.git
synced 2024-09-03 19:25:52 +02:00
Fix
This commit is contained in:
parent
e90fcba04b
commit
83d571ae20
3 changed files with 35 additions and 42 deletions
|
@ -113,18 +113,16 @@ fi
|
||||||
ynh_backup_if_checksum_is_different --file="$final_path/config.json"
|
ynh_backup_if_checksum_is_different --file="$final_path/config.json"
|
||||||
|
|
||||||
domain=$new_domain
|
domain=$new_domain
|
||||||
path_url=${new_path:1}
|
path_url=$new_path
|
||||||
|
|
||||||
# cp ../conf/config.json.example "$final_path/config.json"
|
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="__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="__DOMAIN__" --replace_string="$domain" --target_file="$final_path/config.json"
|
||||||
# ynh_replace_string --match_string="__PATH__" --replace_string="${path_url:1}" --target_file="$final_path/config.json"
|
ynh_replace_string --match_string="__PATH__" --replace_string="${path_url:1}" --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_NAME__" --replace_string="$db_name" --target_file="$final_path/config.json"
|
||||||
# ynh_replace_string --match_string="__DB_PWD__" --replace_string="$db_pwd" --target_file="$final_path/config.json"
|
ynh_replace_string --match_string="__DB_PWD__" --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_replace_string --match_string="__APP__" --replace_string="$app" --target_file="$final_path/config.json"
|
||||||
|
|
||||||
ynh_add_config --template="../conf/config.json.example" --destination="$final_path/config.json"
|
|
||||||
|
|
||||||
ynh_store_file_checksum --file="$final_path/config.json"
|
ynh_store_file_checksum --file="$final_path/config.json"
|
||||||
|
|
||||||
|
|
|
@ -135,27 +135,24 @@ ynh_add_systemd_config
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Modifying a config file..." --weight=1
|
ynh_script_progression --message="Modifying a config file..." --weight=1
|
||||||
|
|
||||||
# cp ../conf/config.json.example "$final_path/config.json"
|
cp ../conf/config.json.example "$final_path/config.json"
|
||||||
|
|
||||||
path_url=${path_url:1}
|
|
||||||
# Main config File
|
# Main config File
|
||||||
# ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="$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="__DOMAIN__" --replace_string="$domain" --target_file="$final_path/config.json"
|
||||||
# ynh_replace_string --match_string="__PATH__" --replace_string="${path_url:1}" --target_file="$final_path/config.json"
|
ynh_replace_string --match_string="__PATH__" --replace_string="${path_url:1}" --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_NAME__" --replace_string="$db_name" --target_file="$final_path/config.json"
|
||||||
# ynh_replace_string --match_string="__DB_PWD__" --replace_string="$db_pwd" --target_file="$final_path/config.json"
|
ynh_replace_string --match_string="__DB_PWD__" --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_replace_string --match_string="__APP__" --replace_string="$app" --target_file="$final_path/config.json"
|
||||||
|
|
||||||
ynh_add_config --template="../conf/config.json.example" --destination="$final_path/config.json"
|
|
||||||
ynh_store_file_checksum --file="$final_path/config.json"
|
ynh_store_file_checksum --file="$final_path/config.json"
|
||||||
|
|
||||||
# cp ../conf/.sequelizerc.example "$final_path/.sequelizerc"
|
cp ../conf/.sequelizerc.example "$final_path/.sequelizerc"
|
||||||
|
|
||||||
# # DB Config File
|
# # DB Config File
|
||||||
# ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --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_PWD__" --replace_string="$db_pwd" --target_file="$final_path/.sequelizerc"
|
ynh_replace_string --match_string="__DB_PWD__" --replace_string="$db_pwd" --target_file="$final_path/.sequelizerc"
|
||||||
|
|
||||||
ynh_add_config --template="../conf/.sequelizerc.example" --destination="$final_path/.sequelizerc"
|
|
||||||
ynh_store_file_checksum --file="$final_path/.sequelizerc"
|
ynh_store_file_checksum --file="$final_path/.sequelizerc"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -127,27 +127,25 @@ then
|
||||||
popd || ynh_die
|
popd || ynh_die
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# #=================================================
|
#=================================================
|
||||||
# # MODIFY A CONFIG FILE
|
# MODIFY A CONFIG FILE
|
||||||
# #=================================================
|
#=================================================
|
||||||
# ynh_script_progression --message="Modifying a config file..." --weight=2
|
ynh_script_progression --message="Modifying a config file..." --weight=2
|
||||||
|
|
||||||
# ynh_backup_if_checksum_is_different --file="$final_path/config.json"
|
ynh_backup_if_checksum_is_different --file="$final_path/config.json"
|
||||||
|
|
||||||
# path_url=${path_url:1}
|
cp ../conf/config.json.example "$final_path/config.json"
|
||||||
# # cp ../conf/config.json.example "$final_path/config.json"
|
|
||||||
|
|
||||||
# # # Main config File
|
# # Main config File
|
||||||
# # ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="$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="__DOMAIN__" --replace_string="$domain" --target_file="$final_path/config.json"
|
||||||
# # ynh_replace_string --match_string="__PATH__" --replace_string="${path_url:1}" --target_file="$final_path/config.json"
|
ynh_replace_string --match_string="__PATH__" --replace_string="${path_url:1}" --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_NAME__" --replace_string="$db_name" --target_file="$final_path/config.json"
|
||||||
# # ynh_replace_string --match_string="__DB_PWD__" --replace_string="$db_pwd" --target_file="$final_path/config.json"
|
ynh_replace_string --match_string="__DB_PWD__" --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_replace_string --match_string="__APP__" --replace_string="$app" --target_file="$final_path/config.json"
|
||||||
|
|
||||||
# ynh_add_config --template="../conf/config.json.example" --destination="$final_path/config.json"
|
# Recalculate and store the checksum of the file for the next upgrade.
|
||||||
# # Recalculate and store the checksum of the file for the next upgrade.
|
ynh_store_file_checksum --file="$final_path/config.json"
|
||||||
# ynh_store_file_checksum --file="$final_path/config.json"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SETUP SYSTEMD
|
# SETUP SYSTEMD
|
||||||
|
|
Loading…
Add table
Reference in a new issue