diff --git a/scripts/install b/scripts/install index ffed7a6..0e79b5f 100644 --- a/scripts/install +++ b/scripts/install @@ -12,6 +12,8 @@ source ynh_add_swap source /usr/share/yunohost/helpers admin_mail=$(ynh_user_get_info --username=$admin --key=mail) +# Set `service` settings to support `yunohost app shell` command +ynh_app_setting_set --app="$app" --key=service --value="$app-web.service" #================================================= # APP "BUILD" (DEPLOYING SOURCES, VENV, COMPILING ETC) diff --git a/scripts/upgrade b/scripts/upgrade index 275f5da..8b477b2 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -58,6 +58,12 @@ if [[ -z "$redis_namespace" ]]; then ynh_app_setting_set --app=$app --key=redis_namespace --value=$redis_namespace fi +# If service doesn't exist, create it +if [[ -z "$service" ]]; then + # Set `service` settings to support `yunohost app shell` command + ynh_app_setting_set --app="$app" --key=service --value="$app-web.service" +fi + #Remove previous added repository ynh_remove_extra_repo