[Fix] src_id doesn't exist

This commit is contained in:
Maniack Crudelis 2019-04-09 19:12:05 +02:00 committed by GitHub
parent 214d1ce8fc
commit e9aed65b0c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -166,11 +166,11 @@ ynh_setup_source () {
ynh_handle_getopts_args "$@" ynh_handle_getopts_args "$@"
source_id="${source_id:-app}" # If the argument is not given, source_id equals "app" source_id="${source_id:-app}" # If the argument is not given, source_id equals "app"
local src_file_path="$YNH_CWD/../conf/${src_id}.src" local src_file_path="$YNH_CWD/../conf/${source_id}.src"
# In case of restore script the src file is in an other path. # In case of restore script the src file is in an other path.
# So try to use the restore path if the general path point to no file. # So try to use the restore path if the general path point to no file.
if [[ ! -e "$src_file_path" ]]; then if [[ ! -e "$src_file_path" ]]; then
src_file_path="$YNH_CWD/../settings/conf/${src_id}.src" src_file_path="$YNH_CWD/../settings/conf/${source_id}.src"
fi fi
# Load value from configuration file (see above for a small doc about this file # Load value from configuration file (see above for a small doc about this file