diff options
| author | yalh76 <yalh@yahoo.com> | 2020-02-25 21:37:52 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-02-25 21:37:52 +0100 |
| commit | 2b588c79f4c1a28f0ffe25781a68673abe69434c (patch) | |
| tree | 4863f9656e46cbf77b2dcde17160fe3e477d77c8 /scripts/install | |
| parent | ea70a2cd4f17daecf49e2b414c0e95e4385cf1a6 (diff) | |
| parent | f00ae6d6b926cf80236d98617b579c176beb8dfe (diff) | |
| download | mastodon_ynh-2b588c79f4c1a28f0ffe25781a68673abe69434c.tar.gz mastodon_ynh-2b588c79f4c1a28f0ffe25781a68673abe69434c.tar.bz2 mastodon_ynh-2b588c79f4c1a28f0ffe25781a68673abe69434c.zip | |
Merge pull request #194 from YunoHost-Apps/example_ynh
Apply example_ynh
Diffstat (limited to 'scripts/install')
| -rw-r--r-- | scripts/install | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/scripts/install b/scripts/install index 58f0caa..989954b 100644 --- a/scripts/install +++ b/scripts/install @@ -17,6 +17,7 @@ source /usr/share/yunohost/helpers #================================================= # MANAGE SCRIPT FAILURE #================================================= +ynh_script_progression --message="Managing script failure..." --weight=1 ynh_clean_setup () { ynh_clean_check_starting @@ -27,6 +28,7 @@ ynh_abort_if_errors #================================================= # RETRIEVE ARGUMENTS FROM THE MANIFEST #================================================= +ynh_script_progression --message="Retrieving arguments from the manifest..." --weight=1 domain=$YNH_APP_ARG_DOMAIN path_url="/" @@ -67,7 +69,7 @@ ynh_app_setting_set --app=$app --key=language --value=$language #================================================= ynh_script_progression --message="Configuring firewall..." --weight=1 -# Find a free port +# Find an available port port_web=$(ynh_find_port --port=3000) port_stream=$(ynh_find_port --port=4000) # Open this port @@ -91,7 +93,7 @@ ynh_script_progression --message="Creating a PostgreSQL database..." --weight=5 # Create postgresql database db_name="${app}_production" db_user=$app -db_pwd=$(ynh_string_random 30) +db_pwd=$(ynh_string_random --length=30) ynh_app_setting_set --app=$app --key=db_name --value=$db_name ynh_app_setting_set --app=$app --key=db_pwd --value=$db_pwd ynh_psql_test_if_first_run @@ -129,6 +131,7 @@ ynh_system_user_create --username=$app --home_dir=$final_path #================================================= # ADD SWAP IF NEEDED #================================================= +ynh_script_progression --message="Adding swap is needed..." --weight=4 total_memory=$(ynh_check_ram) total_swap=$(ynh_check_ram --only_swap) @@ -251,9 +254,9 @@ ynh_script_progression --message="Securing files and directories..." --weight=9 chown -R "$app": "$final_path" #================================================= -# ADVERTISE SERVICE IN ADMIN PANEL +# INTEGRATE SERVICE IN YUNOHOST #================================================= -ynh_script_progression --message="Advertising service in admin panel..." --weight=3 +ynh_script_progression --message="Integrating service in YunoHost..." --weight=3 yunohost service add "$app-web" yunohost service add "$app-sidekiq" |
