mirror of
https://github.com/YunoHost-Apps/acropolis_ynh.git
synced 2024-09-03 18:06:22 +02:00
Fix inneffectual args and startup timeouts (#26)
* add description and disclaimer * remove ineffectual arguments and stop timeouts on systemd startup
This commit is contained in:
parent
ebb899ccd2
commit
683eac07f1
3 changed files with 6 additions and 43 deletions
|
@ -30,41 +30,10 @@
|
||||||
"name": "domain",
|
"name": "domain",
|
||||||
"type": "domain"
|
"type": "domain"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "path",
|
|
||||||
"type": "path",
|
|
||||||
"example": "/",
|
|
||||||
"default": "/"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "admin",
|
|
||||||
"type": "user"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "is_public",
|
"name": "is_public",
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"default": true
|
"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."
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,11 +26,8 @@ ynh_abort_if_errors
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
domain=$YNH_APP_ARG_DOMAIN
|
domain=$YNH_APP_ARG_DOMAIN
|
||||||
path_url=$YNH_APP_ARG_PATH
|
path_url="/"
|
||||||
admin=$YNH_APP_ARG_ADMIN
|
|
||||||
is_public=$YNH_APP_ARG_IS_PUBLIC
|
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
|
### 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
|
### 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_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=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
|
# STANDARD MODIFICATIONS
|
||||||
|
@ -213,7 +207,6 @@ ynh_script_progression --message="Adding a configuration file..." --time --weigh
|
||||||
|
|
||||||
database_yml="$final_path/config/database.yml"
|
database_yml="$final_path/config/database.yml"
|
||||||
diaspora_toml="$final_path/config/diaspora.toml"
|
diaspora_toml="$final_path/config/diaspora.toml"
|
||||||
language="$(echo $language | head -c 2)"
|
|
||||||
|
|
||||||
redis_namespace=${app}_production
|
redis_namespace=${app}_production
|
||||||
ynh_app_setting_set --app="$app" --key=redis_namespace --value="$redis_namespace"
|
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_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}-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}-sidekiq --action="start" --log_path=systemd --line_match="Booted Rails"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SETUP SSOWAT
|
# SETUP SSOWAT
|
||||||
|
|
|
@ -72,6 +72,7 @@ ynh_restore_file --origin_path="$final_path"
|
||||||
# files in some cases.
|
# files in some cases.
|
||||||
# But FOR THE LOVE OF GOD, do not allow r/x for "others" on the entire folder -
|
# 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.
|
# this will be treated as a security issue.
|
||||||
|
mkdir -p "$final_path/tmp/pids"
|
||||||
chmod 750 "$final_path"
|
chmod 750 "$final_path"
|
||||||
chmod -R o-rwx "$final_path"
|
chmod -R o-rwx "$final_path"
|
||||||
chown -R $app:www-data "$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_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}-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}-sidekiq --action="start" --log_path=systemd --line_match="Booted Rails"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# GENERIC FINALIZATION
|
# GENERIC FINALIZATION
|
||||||
|
|
Loading…
Add table
Reference in a new issue