mirror of
https://github.com/YunoHost-Apps/diaspora_ynh.git
synced 2024-09-03 18:26:13 +02:00
Remove some --time
This commit is contained in:
parent
28ddd19abb
commit
b760cb2af9
2 changed files with 17 additions and 18 deletions
|
@ -61,7 +61,7 @@ ynh_webpath_register --app=$app --domain=$domain --path_url=/
|
|||
#=================================================
|
||||
# STORE SETTINGS FROM MANIFEST
|
||||
#=================================================
|
||||
ynh_script_progression --message="Saving app settings..." --time --weight=1
|
||||
ynh_script_progression --message="Saving app settings..." --weight=1
|
||||
ynh_app_setting_set --app=$app --key=domain --value=$domain
|
||||
ynh_app_setting_set --app=$app --key=path --value=/
|
||||
ynh_app_setting_set --app=$app --key=final_path --value=$final_path
|
||||
|
@ -73,13 +73,13 @@ ynh_app_setting_set --app=$app --key=final_path --value=$final_path
|
|||
#=================================================
|
||||
# INSTALL DEPENDENCIES
|
||||
#=================================================
|
||||
ynh_script_progression --message="Installing dependencies..." --time --weight=27
|
||||
ynh_script_progression --message="Installing dependencies..." --weight=27
|
||||
ynh_install_app_dependencies $pkg_dependencies $ruby_build_dependencies
|
||||
|
||||
#=================================================
|
||||
# CREATE A POSTGRESQL DATABASE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Creating database..." --time --weight=1
|
||||
ynh_script_progression --message="Creating database..." --weight=1
|
||||
db_name=$(ynh_sanitize_dbid $app)
|
||||
ynh_app_setting_set --app=$app --key=db_name --value=$db_name
|
||||
ynh_psql_test_if_first_run
|
||||
|
@ -89,7 +89,7 @@ db_pass=$(ynh_app_setting_get --app=$app --key=psqlpwd)
|
|||
#=================================================
|
||||
# CREATE DEDICATED USER
|
||||
#=================================================
|
||||
ynh_script_progression --message="Creating user..." --time --weight=1
|
||||
ynh_script_progression --message="Creating user..." --weight=1
|
||||
# Create a system user
|
||||
ynh_system_user_create --username=$app --home_dir=$final_path --use_shell
|
||||
mkdir -p $final_path
|
||||
|
@ -100,11 +100,11 @@ chown $app:$app $final_path
|
|||
#=================================================
|
||||
# INSTALL RVM AND RUBY FOR CURRENT USER
|
||||
#=================================================
|
||||
ynh_script_progression --message="Installing rvm..." --time --weight=10
|
||||
ynh_script_progression --message="Installing rvm..." --weight=10
|
||||
sudo -u $app gpg --import ../conf/piotr.kuczynski\@gmail.com.pgp ../conf/mpapis\@gmail.com.pgp
|
||||
pushd $final_path
|
||||
sudo -u $app curl -sSL https://get.rvm.io | sudo -u $app bash -s stable
|
||||
ynh_script_progression --message="Installing ruby 2.4 (this can take a long time)..." --time --weight=230
|
||||
ynh_script_progression --message="Installing ruby 2.4 (this can take a long time)..." --weight=230
|
||||
sudo -u $app $final_path/.rvm/bin/rvm autolibs read-fail
|
||||
sudo -u $app $final_path/.rvm/bin/rvm install 2.4
|
||||
|
||||
|
@ -112,7 +112,7 @@ sudo -u $app $final_path/.rvm/bin/rvm install 2.4
|
|||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||
#=================================================
|
||||
# Download, check integrity, unucompress and patch the source from app.src
|
||||
ynh_script_progression --message="Download the sources..." --time --weight=16
|
||||
ynh_script_progression --message="Download the sources..." --weight=16
|
||||
sudo -u $app git clone https://github.com/diaspora/diaspora.git -b v0.7.13.0
|
||||
popd
|
||||
|
||||
|
@ -128,7 +128,7 @@ export admin
|
|||
#=================================================
|
||||
# CONFIGURE DIASPORA
|
||||
#=================================================
|
||||
ynh_script_progression --message="Configure diaspora..." --time --weight=1
|
||||
ynh_script_progression --message="Configure diaspora..." --weight=1
|
||||
ynh_render_template ../conf/diaspora.yml $final_path/diaspora/config/diaspora.yml
|
||||
ynh_render_template ../conf/database.yml $final_path/diaspora/config/database.yml
|
||||
|
||||
|
@ -136,7 +136,7 @@ ynh_render_template ../conf/database.yml $final_path/diaspora/config/database.ym
|
|||
# Bundle the ruby app
|
||||
#=================================================
|
||||
pushd $final_path/diaspora
|
||||
ynh_script_progression --message="bundle the app..." --time --weight=1000
|
||||
ynh_script_progression --message="bundle the app..." --weight=1000
|
||||
# here we *absolutely* need bash (not dash) because dash does not understand what rvm puts in .profile
|
||||
# (wtf rvm for assuming everybody uses bash as default shell??)
|
||||
# we also need a login shell to make sure .profile is loaded
|
||||
|
@ -146,7 +146,7 @@ rvm 2.4 do gem install bundler:1.17.3
|
|||
script/configure_bundler
|
||||
bin/bundle install --full-index --with=postgresql
|
||||
EOF
|
||||
ynh_script_progression --message="Create db schema..." --time --weight=22
|
||||
ynh_script_progression --message="Create db schema..." --weight=22
|
||||
sudo -u $app /bin/bash --login << EOF
|
||||
RAILS_ENV=production bundle exec rake db:migrate
|
||||
EOF
|
||||
|
@ -154,7 +154,7 @@ EOF
|
|||
#=================================================
|
||||
# ASSETS PRECOMPILATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Precompile assets..." --time --weight=400
|
||||
ynh_script_progression --message="Precompile assets..." --weight=400
|
||||
sudo -u $app /bin/bash --login << EOF
|
||||
RAILS_ENV=production bin/rake assets:precompile
|
||||
EOF
|
||||
|
@ -163,9 +163,8 @@ popd
|
|||
#=================================================
|
||||
# NGINX CONFIGURATION
|
||||
#=================================================
|
||||
# TODO serve public/ ?
|
||||
# Create a dedicated nginx config
|
||||
ynh_script_progression --message="configure nginx..." --time --weight=1
|
||||
ynh_script_progression --message="configure nginx..." --weight=1
|
||||
ynh_add_nginx_config
|
||||
|
||||
#=================================================
|
||||
|
@ -173,7 +172,7 @@ ynh_add_nginx_config
|
|||
#=================================================
|
||||
# Create a dedicated systemd config
|
||||
# TODO add service in yunohost panel ?
|
||||
ynh_script_progression --message="configure systemd unit..." --time --weight=1
|
||||
ynh_script_progression --message="configure systemd unit..." --weight=1
|
||||
ynh_render_template ../conf/diaspora_sidekiq.service /etc/systemd/system/${app}_sidekiq.service
|
||||
ynh_render_template ../conf/diaspora_web.service /etc/systemd/system/${app}_web.service
|
||||
ynh_render_template ../conf/diaspora.tmpfiles.d /etc/tmpfiles.d/${app}.conf
|
||||
|
@ -221,13 +220,13 @@ ynh_app_setting_set $app unprotected_uris "/"
|
|||
#=================================================
|
||||
# RELOAD NGINX
|
||||
#=================================================
|
||||
ynh_script_progression --message="Reload nginx..." --time --weight=1
|
||||
ynh_script_progression --message="Reload nginx..." --weight=1
|
||||
systemctl reload nginx
|
||||
|
||||
#=================================================
|
||||
# CREATE AN ADMIN
|
||||
#=================================================
|
||||
ynh_script_progression --message="Create admin..." --time --weight=1
|
||||
ynh_script_progression --message="Create admin..." --weight=1
|
||||
pushd $final_path/diaspora
|
||||
sudo -u diaspora /bin/bash --login << EOF
|
||||
RAILS_ENV=production bundle exec rails console << END
|
||||
|
|
|
@ -18,7 +18,7 @@ ynh_abort_if_errors
|
|||
#=================================================
|
||||
# LOAD SETTINGS
|
||||
#=================================================
|
||||
ynh_script_progression --message="Loading settings..." --time --weight=1
|
||||
ynh_script_progression --message="Loading settings..." --weight=1
|
||||
|
||||
app=$YNH_APP_INSTANCE_NAME
|
||||
|
||||
|
@ -31,7 +31,7 @@ db_user=$db_name
|
|||
#=================================================
|
||||
# CHECK IF THE APP CAN BE RESTORED
|
||||
#=================================================
|
||||
ynh_script_progression --message="Validating restoration parameters..." --time --weight=1
|
||||
ynh_script_progression --message="Validating restoration parameters..."
|
||||
|
||||
ynh_webpath_available --domain=$domain --path_url=$path_url \
|
||||
|| ynh_die --message="Path not available: ${domain}${path_url}"
|
||||
|
|
Loading…
Reference in a new issue