diff options
| author | yalh76 <yalh@yahoo.com> | 2020-02-23 18:44:50 +0100 |
|---|---|---|
| committer | yalh76 <yalh@yahoo.com> | 2020-02-23 18:44:50 +0100 |
| commit | 6ff11dacb201a08506b345953aa7b9bd39eeacf5 (patch) | |
| tree | ec12b2eca75ba3701644f50fd04d16a0c4f49528 /scripts/install | |
| parent | ea70a2cd4f17daecf49e2b414c0e95e4385cf1a6 (diff) | |
| download | mastodon_ynh-6ff11dacb201a08506b345953aa7b9bd39eeacf5.tar.gz mastodon_ynh-6ff11dacb201a08506b345953aa7b9bd39eeacf5.tar.bz2 mastodon_ynh-6ff11dacb201a08506b345953aa7b9bd39eeacf5.zip | |
Apply example_ynh
Diffstat (limited to 'scripts/install')
| -rw-r--r-- | scripts/install | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/scripts/install b/scripts/install index 58f0caa..f769f03 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 --length30) 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) |
