1
0
Fork 0
mirror of https://github.com/YunoHost/apps.git synced 2024-09-03 20:06:07 +02:00
This commit is contained in:
lapineige 2024-02-25 14:26:19 +00:00 committed by Alexandre Aubin
parent cf92b38acc
commit 4edf054729
2 changed files with 11 additions and 7 deletions

View file

@ -28,7 +28,7 @@ yunohost = '>= {{ data.yunohost_required_version or '11.2'}}'
# List of supported archs using the dpkg --print-architecture nomenclature (amd64/i386/armhf/arm64), for example: ["amd64", "i386'] # List of supported archs using the dpkg --print-architecture nomenclature (amd64/i386/armhf/arm64), for example: ["amd64", "i386']
{% endif -%} {% endif -%}
architectures = "{{ data.architectures }}" # TODO : handle the "all" option (no ["all"]) architectures = "{{ data.architectures }}" # TODO : handle the "all" option (no ["all"])
multi_instance = {% if data.multi_instance -%} true {% else -%} false {% endif -%} multi_instance = {{ "true" if data.multi_instance else "false" }}
ldap = "{{ data.ldap }}" # TODO : fixme, use actual booleans + handle the "not_relevant" value ldap = "{{ data.ldap }}" # TODO : fixme, use actual booleans + handle the "not_relevant" value
sso = "{{ data.sso }}" sso = "{{ data.sso }}"
# FIXME: replace with an **estimate** minimum disk and RAM requirements. e.g. 20M, 400M, 1G... You may have have a look at CI results # FIXME: replace with an **estimate** minimum disk and RAM requirements. e.g. 20M, 400M, 1G... You may have have a look at CI results
@ -51,7 +51,7 @@ ram.runtime = "50M"
# this is a generic question - ask strings are automatically handled by YunoHost's core # this is a generic question - ask strings are automatically handled by YunoHost's core
{% endif -%} {% endif -%}
type = "path" type = "path"
default = "/example" default = "/{{ data.app_id }}"
{% endif -%} {% endif -%}
{% endif %} {% endif %}

View file

@ -85,7 +85,8 @@ then
ynh_script_progression --message="Upgrading source files..." ynh_script_progression --message="Upgrading source files..."
# Download, check integrity, uncompress and patch the source from app.src # Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$install_dir" ynh_setup_source --dest_dir="$install_dir" --full_replace=1 --keep=".env"
{{ data.custom_config_file }}
fi fi
{% if data.generator_mode == 'tutorial' -%} {% if data.generator_mode == 'tutorial' -%}
@ -132,6 +133,7 @@ chown root: "$cron_path"
chmod 644 "$cron_path" chmod 644 "$cron_path"
{% endif %} {% endif %}
{% if data.use_custom_config_file -%}
#================================================= #=================================================
# RECONFIGURE THE APP (UPDATE CONF, APPLY MIGRATIONS...) # RECONFIGURE THE APP (UPDATE CONF, APPLY MIGRATIONS...)
#================================================= #=================================================
@ -153,16 +155,18 @@ ynh_add_config --template="{{ data.custom_config_file }}" --destination="$instal
# You may need to use chmod 600 instead of 400, # 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 # for example if the app is expected to be able to modify its own config
{% endif %} {% endif %}
chmod 400 "$install_dir/some_config_file" chmod 400 "$install_dir/{{ data.custom_config_file }}"
chown $app:$app "$install_dir/some_config_file" chown $app:$app "$install_dir/{{ data.custom_config_file }}"
{% if data.generator_mode == 'tutorial' -%} {% if data.generator_mode == 'tutorial' -%}
### For more complex cases where you want to replace stuff using regexes, ### 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) ### you shoud rely on ynh_replace_string (which is basically a wrapper for sed)
### When doing so, you also need to manually call ynh_store_file_checksum ### When doing so, you also need to manually call ynh_store_file_checksum
### ###
### ynh_replace_string --match_string="match_string" --replace_string="replace_string" --target_file="$install_dir/some_config_file" ### ynh_replace_string --match_string="match_string" --replace_string="replace_string" --target_file="$install_dir/{{ data.custom_config_file }}"
### ynh_store_file_checksum --file="$install_dir/some_config_file" ### ynh_store_file_checksum --file="$install_dir/{{ data.custom_config_file }}"
{% endif %}
{% endif %} {% endif %}
{% if data.main_technology not in ["php", "none"] -%} {% if data.main_technology not in ["php", "none"] -%}