diff --git a/manifest.json b/manifest.json index 594d1ff..0139e54 100644 --- a/manifest.json +++ b/manifest.json @@ -24,29 +24,17 @@ { "name": "domain", "type": "domain", - "ask": { - "en": "Choose a domain name for Etherpad", - "fr": "Choisissez un nom de domaine pour Etherpad" - }, "example": "example.com" }, { "name": "path", "type": "path", - "ask": { - "en": "Choose a path for Etherpad", - "fr": "Choisissez un chemin pour Etherpad" - }, "example": "/etherpad", "default": "/etherpad" }, { "name": "is_public", "type": "boolean", - "ask": { - "en": "Is it a public application?", - "fr": "Est-ce une application publique ?" - }, "help": { "en": "If enabled, Etherpad will be accessible by people who do not have an account. This can be changed later via the webadmin.", "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." @@ -66,19 +54,11 @@ { "name": "admin", "type": "user", - "ask": { - "en": "Choose an admin user", - "fr": "Choisissez l'administrateur" - }, "example": "johndoe" }, { "name": "password", "type": "password", - "ask": { - "en": "Set the administrator password", - "fr": "Définissez le mot de passe administrateur" - }, "example": "Choose a password" } ] diff --git a/scripts/install b/scripts/install index 85c2fda..e3d4ac5 100644 --- a/scripts/install +++ b/scripts/install @@ -74,6 +74,14 @@ ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies ynh_install_nodejs --nodejs_version=$nodejs_version +#================================================= +# CREATE DEDICATED USER +#================================================= +ynh_script_progression --message="Configuring system user..." --weight=4 + +# Create a system user +ynh_system_user_create --username=$app --home_dir=$final_path + #================================================= # CREATE A POSTQRESQL DATABASE #================================================= @@ -106,14 +114,6 @@ ynh_script_progression --message="Configuring NGINX web server..." --weight=4 # Create a dedicated NGINX config ynh_add_nginx_config -#================================================= -# CREATE DEDICATED USER -#================================================= -ynh_script_progression --message="Configuring system user..." --weight=4 - -# Create a system user -ynh_system_user_create --username=$app --home_dir=$final_path - # #================================================= # # INSTALL ETHERPAD # #================================================= diff --git a/scripts/restore b/scripts/restore index 5dc0ae4..3e1e0dc 100644 --- a/scripts/restore +++ b/scripts/restore @@ -51,6 +51,14 @@ test ! -d $final_path \ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" +#================================================= +# RECREATE THE DEDICATED USER +#================================================= +ynh_script_progression --message="Recreating the dedicated system user..." --weight=1 + +# Create the dedicated user (if not existing) +ynh_system_user_create --username=$app --home_dir=$final_path + #================================================= # RESTORE THE APP MAIN DIR #================================================= @@ -78,14 +86,6 @@ ynh_psql_test_if_first_run ynh_psql_setup_db --db_user=$db_user --db_name=$db_name --db_pwd=$db_pwd ynh_psql_execute_file_as_root --file="./db.sql" --database=$db_name -#================================================= -# RECREATE THE DEDICATED USER -#================================================= -ynh_script_progression --message="Recreating the dedicated system user..." --weight=1 - -# Create the dedicated user (if not existing) -ynh_system_user_create --username=$app --home_dir=$final_path - #================================================= # RESTORE USER RIGHTS #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index f218e6c..14235eb 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -92,6 +92,14 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..." - # Create a dedicated NGINX config ynh_add_nginx_config +#================================================= +# CREATE DEDICATED USER +#================================================= +ynh_script_progression --message="Making sure dedicated system user exists..." --weight=4 + +# Create a system user +ynh_system_user_create --username=$app --home_dir=$final_path + #================================================= # INSTALL DEPENDENCIES #================================================= @@ -101,14 +109,6 @@ ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies ynh_install_nodejs --nodejs_version=$nodejs_version -#================================================= -# CREATE DEDICATED USER -#================================================= -ynh_script_progression --message="Making sure dedicated system user exists..." --weight=1 - -# Create a dedicated user (if not existing) -ynh_system_user_create --username=$app - #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= @@ -125,17 +125,6 @@ then popd fi -# #================================================= -# # MODIFY A CONFIG FILE -# #================================================= -# ynh_script_progression --message="Reconfiguring Etherpad..." --weight=6 - -# ynh_add_config --template="../conf/settings.json" --destination="$final_path/settings.json" -# ynh_store_file_checksum --file="$final_path/settings.json" - -# ynh_add_config --template="../conf/credentials.json" --destination="$final_path/credentials.json" -# ynh_store_file_checksum --file="$final_path/credentials.json" - #================================================= # GENERIC FINALIZATION #=================================================