Cleaning up

This commit is contained in:
ericgaspar
2021-03-15 13:29:53 +01:00
parent f4e46f289c
commit 1723550d1d
6 changed files with 23 additions and 42 deletions

View File

@@ -51,7 +51,6 @@ ynh_script_progression --message="Storing installation settings..."
ynh_app_setting_set --app=$app --key=domain --value=$domain
ynh_app_setting_set --app=$app --key=path --value=$path_url
ynh_app_setting_set --app=$app --key=is_public --value=$is_public
ynh_app_setting_set --app=$app --key=ldap_user --value=$ldap_user
ynh_app_setting_set --app=$app --key=ldap_password --value=$ldap_password
@@ -136,12 +135,14 @@ ynh_add_systemd_config --others_var="ynh_node ynh_node_load_PATH"
#=================================================
ynh_script_progression --message="Modifying a config file..."
config_file="$final_path/config.yml"
cp -f ../conf/config.sample.yml $config_file
# config_file="$final_path/config.yml"
# cp -f ../conf/config.sample.yml $config_file
ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="$config_file"
ynh_replace_string --match_string="__DB_PWD__" --replace_string="$db_pwd" --target_file="$config_file"
ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="$config_file"
# ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="$config_file"
# ynh_replace_string --match_string="__DB_PWD__" --replace_string="$db_pwd" --target_file="$config_file"
# ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="$config_file"
ynh_add_config --template="../conf/config.sample.yml" --destination="$final_path/config.yml"
#=================================================
# STORE THE CONFIG FILE CHECKSUM
@@ -159,7 +160,7 @@ ynh_store_file_checksum --file="$config_file"
ynh_script_progression --message="Securing files and directories..."
# Set permissions to app files
chown -R "$app":"$app" "$final_path"
chown -R $app: $final_path
#=================================================
# INTEGRATE SERVICE IN YUNOHOST