1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/meilisearch_ynh.git synced 2024-09-03 19:45:59 +02:00
This commit is contained in:
frju365 2020-05-16 14:28:07 +02:00
parent 661f511a2b
commit d810a7cbee
No known key found for this signature in database
GPG key ID: C892BE847FF5635A
4 changed files with 17 additions and 9 deletions

View file

@ -7,7 +7,7 @@ Type=simple
User=__APP__
Group=__APP__
WorkingDirectory=__FINALPATH__/
ExecStart=/usr/bin/mailisearch --http-addr 127.0.0.1:__PORT__ --env production --master-key __API_KEY__ --no-analytics __ANALYTICS__
ExecStart=/usr/bin/meilisearch --http-addr 127.0.0.1:__PORT__ --env production --master-key __API_KEY__ --no-analytics __ANALYTICS__
[Install]
WantedBy=multi-user.target

View file

@ -72,10 +72,10 @@ port=$(ynh_find_port --port=8095)
ynh_app_setting_set --app=$app --key=port --value=$port
#=================================================
# DOWNLOAD AND INSTALL MAILISEARCH
# DOWNLOAD AND INSTALL MEILISEARCH
#=================================================
ynh_script_progression --message="Installing mailisearch..." --time --weight=1
ynh_script_progression --message="Installing meilisearch..." --time --weight=1
arch=$(ynh_detect_arch)

View file

@ -107,11 +107,10 @@ ynh_restore_file --origin_path="/etc/logrotate.d/$app"
#=================================================
# GENERIC FINALIZATION
#=================================================
# RELOAD NGINX AND PHP-FPM
# RELOAD NGINX
#=================================================
ynh_script_progression --message="Reloading nginx web server and php-fpm..." --time --weight=1
ynh_script_progression --message="Reloading nginx web server..." --time --weight=1
ynh_systemd_action --service_name=php7.0-fpm --action=reload
ynh_systemd_action --service_name=nginx --action=reload
#=================================================

View file

@ -99,11 +99,20 @@ ynh_script_progression --message="Upgrading nginx web server configuration..." -
ynh_add_nginx_config
#=================================================
# UPGRADING MAILISEARCH
# UPGRADING MEILISEARCH
#=================================================
ynh_script_progression --message="Upgrading mailisearch..." --time --weight=1
ynh_script_progression --message="upgrading meilisearch..." --time --weight=1
ynh_installation_mailisearch
arch=$(ynh_detect_arch)
if [ "$arch" != "amd64" ] && [ "$arch" != "armv8" ]
then
ynh_die --message="Your OS Architecture is not supported"
fi
release_file=meilisearch-linux-$arch
curl -OL https://github.com/meilisearch/MeiliSearch/releases/download/$latest/meilisearch-linux-$arch
chmod +x "$release_file"
mv "$release_file" /usr/bin/meilisearch
#=================================================
# CREATE DEDICATED USER