From 683eac07f1371a8e71d6dff8e0f57642f673fa8a Mon Sep 17 00:00:00 2001 From: David Sterry Date: Fri, 10 Dec 2021 00:05:19 -0800 Subject: [PATCH] Fix inneffectual args and startup timeouts (#26) * add description and disclaimer * remove ineffectual arguments and stop timeouts on systemd startup --- manifest.json | 31 ------------------------------- scripts/install | 13 +++---------- scripts/restore | 5 +++-- 3 files changed, 6 insertions(+), 43 deletions(-) diff --git a/manifest.json b/manifest.json index 3c742a9..4bcba9e 100644 --- a/manifest.json +++ b/manifest.json @@ -30,41 +30,10 @@ "name": "domain", "type": "domain" }, - { - "name": "path", - "type": "path", - "example": "/", - "default": "/" - }, - { - "name": "admin", - "type": "user" - }, { "name": "is_public", "type": "boolean", "default": true - }, - { - "name": "language", - "type": "string", - "ask": { - "en": "Choose the application language", - "fr": "Choisissez la langue de l'application" - }, - "choices": [ - "fr", - "en" - ], - "default": "fr" - }, - { - "name": "password", - "type": "password", - "help": { - "en": "Use the help field to add an information for the admin about this question.", - "fr": "Utilisez le champ aide pour ajouter une information à l'intention de l'administrateur à propos de cette question." - } } ] } diff --git a/scripts/install b/scripts/install index d98facc..55402ee 100644 --- a/scripts/install +++ b/scripts/install @@ -26,11 +26,8 @@ ynh_abort_if_errors #================================================= domain=$YNH_APP_ARG_DOMAIN -path_url=$YNH_APP_ARG_PATH -admin=$YNH_APP_ARG_ADMIN +path_url="/" is_public=$YNH_APP_ARG_IS_PUBLIC -language=$YNH_APP_ARG_LANGUAGE -password=$YNH_APP_ARG_PASSWORD ### If it's a multi-instance app, meaning it can be installed several times independently ### The id of the app as stated in the manifest is available as $YNH_APP_ID @@ -71,9 +68,6 @@ ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url ynh_script_progression --message="Storing installation settings..." --time --weight=1 ynh_app_setting_set --app=$app --key=domain --value=$domain -ynh_app_setting_set --app=$app --key=path --value=$path_url -ynh_app_setting_set --app=$app --key=admin --value=$admin -ynh_app_setting_set --app=$app --key=language --value=$language #================================================= # STANDARD MODIFICATIONS @@ -213,7 +207,6 @@ ynh_script_progression --message="Adding a configuration file..." --time --weigh database_yml="$final_path/config/database.yml" diaspora_toml="$final_path/config/diaspora.toml" -language="$(echo $language | head -c 2)" redis_namespace=${app}_production ynh_app_setting_set --app="$app" --key=redis_namespace --value="$redis_namespace" @@ -299,8 +292,8 @@ yunohost service add "$app-sidekiq" --description="$app sidekiq service" #================================================= ynh_script_progression --message="Starting a systemd service..." --time --weight=1 -ynh_systemd_action --service_name=${app}-web --action="start" --log_path=systemd --line_match="Listening on" -ynh_systemd_action --service_name=${app}-sidekiq --action="start" --log_path=systemd --line_match="Schedules Loaded" +ynh_systemd_action --service_name=${app}-web --action="start" --log_path=systemd --line_match="listening on" +ynh_systemd_action --service_name=${app}-sidekiq --action="start" --log_path=systemd --line_match="Booted Rails" #================================================= # SETUP SSOWAT diff --git a/scripts/restore b/scripts/restore index fcaba76..bca979b 100644 --- a/scripts/restore +++ b/scripts/restore @@ -72,6 +72,7 @@ ynh_restore_file --origin_path="$final_path" # files in some cases. # But FOR THE LOVE OF GOD, do not allow r/x for "others" on the entire folder - # this will be treated as a security issue. +mkdir -p "$final_path/tmp/pids" chmod 750 "$final_path" chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path" @@ -163,8 +164,8 @@ yunohost service add "$app-sidekiq" --description="$app sidekiq service" #================================================= ynh_script_progression --message="Starting a systemd service..." --time --weight=1 -ynh_systemd_action --service_name=${app}-web --action="start" --log_path=systemd --line_match="Listening on" -ynh_systemd_action --service_name=${app}-sidekiq --action="start" --log_path=systemd --line_match="Schedules Loaded" +ynh_systemd_action --service_name=${app}-web --action="start" --log_path=systemd --line_match="listening on" +ynh_systemd_action --service_name=${app}-sidekiq --action="start" --log_path=systemd --line_match="Booted Rails" #================================================= # GENERIC FINALIZATION