diff --git a/scripts/install b/scripts/install index 4a1a0e4..d22a3c9 100755 --- a/scripts/install +++ b/scripts/install @@ -79,7 +79,6 @@ ynh_install_app_dependencies $pkg_dependencies $build_pkg_dependencies ynh_install_ruby --ruby_version=$ruby_version ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version ynh_install_extra_app_dependencies --repo="deb https://dl.yarnpkg.com/debian/ stable main" --package="yarn" --key="https://dl.yarnpkg.com/debian/pubkey.gpg" -ynh_install_extra_app_dependencies --repo="deb https://artifacts.elastic.co/packages/8.x/apt stable main" --package="elasticsearch" --key="https://artifacts.elastic.co/GPG-KEY-elasticsearch" #================================================= # CREATE DEDICATED USER @@ -158,12 +157,10 @@ pushd $final_path ynh_exec_warn_less ynh_exec_as $app env RAILS_ENV=production RACK_ENV=production $ynh_ruby_load_path bin/bundle exec rake db:migrate ynh_exec_warn_less ynh_exec_as $app env RAILS_ENV=production RACK_ENV=production $ynh_ruby_load_path bin/bundle exec rake db:seed ADMIN_EMAIL="$admin_mail" ADMIN_PASSWORD="$password" ynh_exec_warn_less ynh_exec_as $app env RAILS_ENV=production RACK_ENV=production $ynh_ruby_load_path bin/bundle exec rake assets:precompile - ynh_exec_warn_less ynh_exec_as $app env RAILS_ENV=production RACK_ENV=production $ynh_ruby_load_path bin/bundle exec rake fablab:es:build_stats popd ynh_install_app_dependencies $pkg_dependencies ynh_install_extra_app_dependencies --repo="deb https://dl.yarnpkg.com/debian/ stable main" --package="yarn" --key="https://dl.yarnpkg.com/debian/pubkey.gpg" -ynh_install_extra_app_dependencies --repo="deb https://artifacts.elastic.co/packages/8.x/apt stable main" --package="elasticsearch" --key="https://artifacts.elastic.co/GPG-KEY-elasticsearch" #================================================= # CREATE DATA DIRECTORY @@ -186,8 +183,6 @@ ynh_script_progression --message="Configuring a systemd service..." # Create a dedicated systemd config ynh_add_supervisor_config -systemctl daemon-reload -systemctl enable elasticsearch.service --quiet #================================================= # GENERIC FINALIZATION @@ -205,7 +200,6 @@ ynh_use_logrotate ynh_script_progression --message="Integrating service in YunoHost..." yunohost service add $app --log="/var/log/supervisor/$app-app-stdout.log /var/log/supervisor/$app-worker-stdout.log" -yunohost service add elasticsearch --log="/var/log/elasticsearch/elasticsearch.log" #================================================= # START SYSTEMD SERVICE @@ -214,7 +208,6 @@ ynh_script_progression --message="Starting a systemd service..." # Start a systemd service ynh_supervisor_action --service_name=$app --action="start" --log_path="/var/log/supervisor/$app-app-stdout.log" --line_match="Listening on" -ynh_systemd_action --service_name=elasticsearch --action="restart" --log_path="systemd" --line_match="Started" #================================================= # SETUP SSOWAT diff --git a/scripts/remove b/scripts/remove index 5178dc6..9a85784 100755 --- a/scripts/remove +++ b/scripts/remove @@ -37,11 +37,6 @@ then ynh_script_progression --message="Removing $app service integration..." yunohost service remove $app fi -if ynh_exec_warn_less yunohost service status elasticsearch >/dev/null -then - ynh_script_progression --message="Removing elasticsearch service integration..." - yunohost service remove elasticsearch -fi #================================================= # STOP AND REMOVE SERVICE diff --git a/scripts/restore b/scripts/restore index 4101ddc..4ac1762 100755 --- a/scripts/restore +++ b/scripts/restore @@ -98,7 +98,6 @@ ynh_install_app_dependencies $pkg_dependencies $build_pkg_dependencies ynh_install_ruby --ruby_version=$ruby_version ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version ynh_install_extra_app_dependencies --repo="deb https://dl.yarnpkg.com/debian/ stable main" --package="yarn" --key="https://dl.yarnpkg.com/debian/pubkey.gpg" -ynh_install_extra_app_dependencies --repo="deb https://artifacts.elastic.co/packages/8.x/apt stable main" --package="elasticsearch" --key="https://artifacts.elastic.co/GPG-KEY-elasticsearch" #================================================= # RESTORE THE POSTGRESQL DATABASE @@ -125,12 +124,10 @@ pushd $final_path ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn install ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn cache clean ynh_exec_warn_less ynh_exec_as $app env RAILS_ENV=production RACK_ENV=production $ynh_ruby_load_path bin/bundle exec rake assets:precompile - ynh_exec_warn_less ynh_exec_as $app env RAILS_ENV=production RACK_ENV=production $ynh_ruby_load_path bin/bundle exec rake fablab:es:build_stats popd ynh_install_app_dependencies $pkg_dependencies ynh_install_extra_app_dependencies --repo="deb https://dl.yarnpkg.com/debian/ stable main" --package="yarn" --key="https://dl.yarnpkg.com/debian/pubkey.gpg" -ynh_install_extra_app_dependencies --repo="deb https://artifacts.elastic.co/packages/8.x/apt stable main" --package="elasticsearch" --key="https://artifacts.elastic.co/GPG-KEY-elasticsearch" #================================================= # RESTORE SYSTEMD @@ -153,7 +150,6 @@ ynh_restore_file --origin_path="/etc/logrotate.d/$app" ynh_script_progression --message="Integrating service in YunoHost..." yunohost service add $app --log="/var/log/supervisor/$app-app-stdout.log /var/log/supervisor/$app-worker-stdout.log" -yunohost service add elasticsearch --log="/var/log/elasticsearch/elasticsearch.log" #================================================= # START SYSTEMD SERVICE @@ -162,7 +158,6 @@ ynh_script_progression --message="Starting a systemd service..." # Start a systemd service ynh_supervisor_action --service_name=$app --action="start" --log_path="/var/log/supervisor/$app-app-stdout.log" --line_match="Listening on" -ynh_systemd_action --service_name=elasticsearch --action="restart" --log_path="systemd" --line_match="Started" #================================================= # GENERIC FINALIZATION diff --git a/scripts/upgrade b/scripts/upgrade index 9afe223..9ad1f4d 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -114,7 +114,6 @@ ynh_install_app_dependencies $pkg_dependencies $build_pkg_dependencies ynh_install_ruby --ruby_version=$ruby_version ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version ynh_install_extra_app_dependencies --repo="deb https://dl.yarnpkg.com/debian/ stable main" --package="yarn" --key="https://dl.yarnpkg.com/debian/pubkey.gpg" -ynh_install_extra_app_dependencies --repo="deb https://artifacts.elastic.co/packages/8.x/apt stable main" --package="elasticsearch" --key="https://artifacts.elastic.co/GPG-KEY-elasticsearch" #================================================= # SPECIFIC UPGRADE @@ -149,13 +148,11 @@ then ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn cache clean ynh_exec_warn_less ynh_exec_as $app env RAILS_ENV=production RACK_ENV=production $ynh_ruby_load_path bin/bundle exec rake db:migrate ynh_exec_warn_less ynh_exec_as $app env RAILS_ENV=production RACK_ENV=production $ynh_ruby_load_path bin/bundle exec rake assets:precompile - ynh_exec_warn_less ynh_exec_as $app env RAILS_ENV=production RACK_ENV=production $ynh_ruby_load_path bin/bundle exec rake fablab:es:build_stats popd fi ynh_install_app_dependencies $pkg_dependencies ynh_install_extra_app_dependencies --repo="deb https://dl.yarnpkg.com/debian/ stable main" --package="yarn" --key="https://dl.yarnpkg.com/debian/pubkey.gpg" -ynh_install_extra_app_dependencies --repo="deb https://artifacts.elastic.co/packages/8.x/apt stable main" --package="elasticsearch" --key="https://artifacts.elastic.co/GPG-KEY-elasticsearch" #================================================= # SETUP SYSTEMD @@ -181,7 +178,6 @@ ynh_use_logrotate --non-append ynh_script_progression --message="Integrating service in YunoHost..." yunohost service add $app --log="/var/log/supervisor/$app-app-stdout.log /var/log/supervisor/$app-worker-stdout.log" -yunohost service add elasticsearch --log="/var/log/elasticsearch/elasticsearch.log" #================================================= # START SYSTEMD SERVICE @@ -189,7 +185,6 @@ yunohost service add elasticsearch --log="/var/log/elasticsearch/elasticsearch.l ynh_script_progression --message="Starting a systemd service..." ynh_supervisor_action --service_name=$app --action="start" --log_path="/var/log/supervisor/$app-app-stdout.log" --line_match="Listening on" -ynh_systemd_action --service_name=elasticsearch --action="restart" --log_path="systemd" --line_match="Started" #================================================= # RELOAD NGINX