1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/vikunja_ynh.git synced 2024-09-03 18:06:26 +02:00

Update upgrade

This commit is contained in:
ericgaspar 2022-01-04 19:13:13 +01:00
parent 608fe96e8d
commit 69b36cd37e
No known key found for this signature in database
GPG key ID: 574F281483054D44

View file

@ -20,7 +20,6 @@ domain=$(ynh_app_setting_get --app=$app --key=domain)
path_url=$(ynh_app_setting_get --app=$app --key=path) path_url=$(ynh_app_setting_get --app=$app --key=path)
final_path=$(ynh_app_setting_get --app=$app --key=final_path) final_path=$(ynh_app_setting_get --app=$app --key=final_path)
port=$(ynh_app_setting_get --app=$app --key=port) port=$(ynh_app_setting_get --app=$app --key=port)
architecture=$(ynh_detect_arch)
db_name=$(ynh_app_setting_get --app=$app --key=db_name) db_name=$(ynh_app_setting_get --app=$app --key=db_name)
db_user=$db_name db_user=$db_name
db_pwd=$(ynh_app_setting_get --app=$app --key=psqlpwd) db_pwd=$(ynh_app_setting_get --app=$app --key=psqlpwd)
@ -30,7 +29,6 @@ secret=$(ynh_string_random --length=32)
#================================================= #=================================================
# CHECK VERSION # CHECK VERSION
#================================================= #=================================================
ynh_script_progression --message="Checking version..."
upgrade_type=$(ynh_check_app_version_changed) upgrade_type=$(ynh_check_app_version_changed)
@ -46,6 +44,11 @@ if ynh_legacy_permissions_exists; then
ynh_app_setting_delete --app=$app --key=is_public ynh_app_setting_delete --app=$app --key=is_public
fi fi
# Create a permission if needed
if ! ynh_permission_exists --permission="api"; then
ynh_permission_create --permission="api" --url="/api" --allowed="visitors" --auth_header="false" --show_tile="false" --protected="true"
fi
#================================================= #=================================================
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
#================================================= #=================================================
@ -103,7 +106,7 @@ chmod +x /opt/vikunja/vikunja
#================================================= #=================================================
# ADD A CONFIGURATION # ADD A CONFIGURATION
#================================================= #=================================================
ynh_script_progression --message="Adding a configuration file..." --weight=1 #ynh_script_progression --message="Adding a configuration file..." --weight=1
# redis_db=$(ynh_redis_get_free_db) # redis_db=$(ynh_redis_get_free_db)
# ynh_add_config --template="../conf/config.yml" --destination="/etc/vikunja/config.yml" # ynh_add_config --template="../conf/config.yml" --destination="/etc/vikunja/config.yml"