From 034165a7e4a8f81c8b3d8d8ecbdd74e9166d1e7b Mon Sep 17 00:00:00 2001 From: asandikci Date: Sat, 6 Jan 2024 13:46:24 +0300 Subject: [PATCH] change config file --- scripts/install | 6 +++--- scripts/upgrade | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/install b/scripts/install index 43c6cd5..647e93b 100755 --- a/scripts/install +++ b/scripts/install @@ -145,13 +145,13 @@ ynh_script_progression --message="Adding a configuration file..." --weight=1 ### ### Check the documentation of `ynh_add_config` for more info. -ynh_add_config --template="some_config_file" --destination="$install_dir/some_config_file" +ynh_add_config --template="../conf/config.php" --destination="$install_dir/config.php" # FIXME: this should be handled by the core in the future # You may need to use chmod 600 instead of 400, # for example if the app is expected to be able to modify its own config -chmod 600 "$install_dir/some_config_file" -chown $app:$app "$install_dir/some_config_file" +chmod 400 "$install_dir/config.php" +chown $app:$app "$install_dir/config.php" ### For more complex cases where you want to replace stuff using regexes, ### you shoud rely on ynh_replace_string (which is basically a wrapper for sed) diff --git a/scripts/upgrade b/scripts/upgrade index ddb8ba3..4c14e2f 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -112,13 +112,13 @@ ynh_script_progression --message="Updating a configuration file..." --weight=1 ### The file will automatically be backed-up if it's found to be manually modified (because ### ynh_add_config keeps track of the file's checksum) -ynh_add_config --template="some_config_file" --destination="$install_dir/some_config_file" +ynh_add_config --template="../conf/config.php" --destination="$install_dir/config.php" # FIXME: this should be handled by the core in the future # You may need to use chmod 600 instead of 400, # for example if the app is expected to be able to modify its own config -chmod 400 "$install_dir/some_config_file" -chown $app:$app "$install_dir/some_config_file" +chmod 400 "$install_dir/config.php" +chown $app:$app "$install_dir/config.php" ### For more complex cases where you want to replace stuff using regexes, ### you shoud rely on ynh_replace_string (which is basically a wrapper for sed)