mirror of
https://github.com/YunoHost-Apps/coin_ynh.git
synced 2024-09-03 18:16:26 +02:00
Merge pull request #39 from YunoHost-Apps/new_jinja_helper
Add jinja helper for apps
This commit is contained in:
commit
5c9a5166bf
4 changed files with 6 additions and 10 deletions
|
@ -7,7 +7,8 @@ DEBUG = TEMPLATE_DEBUG = False
|
||||||
|
|
||||||
ALLOWED_HOSTS = ['{{ domain }}']
|
ALLOWED_HOSTS = ['{{ domain }}']
|
||||||
|
|
||||||
URL_PREFIX = '{{ prefix }}'
|
# Prefix is hard coded for now as the app can only be installed on whole domain
|
||||||
|
URL_PREFIX = ''
|
||||||
STATIC_ROOT = '{{ install_dir }}/static'
|
STATIC_ROOT = '{{ install_dir }}/static'
|
||||||
NOTIFICATION_EMAILS = ['{{ email }}']
|
NOTIFICATION_EMAILS = ['{{ email }}']
|
||||||
DEFAULT_FROM_EMAIL = 'notifier@{{ domain }}'
|
DEFAULT_FROM_EMAIL = 'notifier@{{ domain }}'
|
||||||
|
|
|
@ -17,7 +17,7 @@ website = "https://code.ffdn.org/FFDN/coin"
|
||||||
code = "https://code.ffdn.org/ffdn/coin"
|
code = "https://code.ffdn.org/ffdn/coin"
|
||||||
|
|
||||||
[integration]
|
[integration]
|
||||||
yunohost = ">= 11.2.0"
|
yunohost = ">= 11.2.13"
|
||||||
architectures = "all"
|
architectures = "all"
|
||||||
multi_instance = false
|
multi_instance = false
|
||||||
ldap = false
|
ldap = false
|
||||||
|
|
|
@ -7,9 +7,7 @@ ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app
|
||||||
|
|
||||||
ynh_change_url_nginx_config
|
ynh_change_url_nginx_config
|
||||||
|
|
||||||
ynh_backup_if_checksum_is_different --file="$install_dir/coin/settings_local.py"
|
ynh_add_config --jinja --template=local.py.j2 --destination="$install_dir/coin/settings_local.py"
|
||||||
ynh_render_template ../conf/local.py.j2 "$install_dir/coin/settings_local.py"
|
|
||||||
ynh_store_file_checksum --file="$install_dir/coin/settings_local.py"
|
|
||||||
|
|
||||||
chmod 400 "$install_dir/coin/settings_local.py"
|
chmod 400 "$install_dir/coin/settings_local.py"
|
||||||
chown $app "$install_dir/coin/settings_local.py"
|
chown $app "$install_dir/coin/settings_local.py"
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
source _common.sh
|
source _common.sh
|
||||||
source /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
export secret=$(ynh_string_random 24)
|
secret=$(ynh_string_random 24)
|
||||||
ynh_app_setting_set --app=$app --key=secret --value=$secret
|
ynh_app_setting_set --app=$app --key=secret --value=$secret
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -37,10 +37,7 @@ popd
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Configuring application..."
|
ynh_script_progression --message="Configuring application..."
|
||||||
|
|
||||||
export prefix="${path#"/"}/"
|
ynh_add_config --jinja --template=local.py.j2 --destination="$install_dir/coin/settings_local.py"
|
||||||
prefix=${prefix%"/"}
|
|
||||||
ynh_render_template ../conf/local.py.j2 "$install_dir/coin/settings_local.py"
|
|
||||||
ynh_store_file_checksum --file="$install_dir/coin/settings_local.py"
|
|
||||||
chmod 400 "$install_dir/coin/settings_local.py"
|
chmod 400 "$install_dir/coin/settings_local.py"
|
||||||
chown $app "$install_dir/coin/settings_local.py"
|
chown $app "$install_dir/coin/settings_local.py"
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue