diff --git a/manifest.json b/manifest.json index 487ec0d..ccb9dc8 100755 --- a/manifest.json +++ b/manifest.json @@ -38,6 +38,11 @@ "example": "/n8n", "default": "/n8n" }, + { + "name": "admin", + "type": "user", + "example": "johndoe" + }, { "name": "is_public", "type": "boolean", @@ -46,6 +51,15 @@ "fr": "Si cette case est cochée, Etherpad sera accessible aux personnes n’ayant pas de compte. Vous pourrez changer ceci plus tard via la webadmin." }, "default": true + }, + { + "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." + }, + "example": "Choose a password" } ] } diff --git a/scripts/install b/scripts/install index ab449ff..208d34e 100755 --- a/scripts/install +++ b/scripts/install @@ -26,6 +26,8 @@ ynh_abort_if_errors domain=$YNH_APP_ARG_DOMAIN path_url=$YNH_APP_ARG_PATH is_public=$YNH_APP_ARG_IS_PUBLIC +password=$YNH_APP_ARG_PASSWORD +admin=$YNH_APP_ARG_ADMIN app=$YNH_APP_INSTANCE_NAME @@ -47,6 +49,7 @@ ynh_script_progression --message="Storing installation settings..." --weight=2 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 #================================================= # STANDARD MODIFICATIONS diff --git a/scripts/upgrade b/scripts/upgrade index 8a7fcbd..b210d57 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -93,16 +93,6 @@ ynh_script_progression --message="Installing dependencies..." --weight=12 ynh_install_nodejs --nodejs_version=$nodejs_version -#================================================= -# UPDATE A CONFIG FILE -#================================================= -ynh_script_progression --message="Updating a configuration file..." --weight=1 - -ynh_add_config --template="../conf/.env" --destination="$final_path/.env" - -chmod 400 "$final_path/.env" -chown $app:$app "$final_path/.env" - #================================================= # SETUP SYSTEMD #================================================= @@ -123,7 +113,7 @@ yunohost service add $app --description="" --log="/var/log/$app/$app.log" #================================================= ynh_script_progression --message="Starting a systemd service..." --weight=6 -ynh_systemd_action --service_name=$app --action=restart --log_path=systemd #--line_match="" +ynh_systemd_action --service_name=$app --action=restart --log_path=systemd #================================================= # RELOAD NGINX