1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/monitorix_ynh.git synced 2024-09-03 19:46:06 +02:00
monitorix_ynh/scripts/upgrade

35 lines
725 B
Text
Raw Normal View History

2017-01-05 23:37:07 +01:00
#!/bin/bash
2017-07-21 22:11:45 +02:00
# Source YunoHost helpers
source /usr/share/yunohost/helpers
# Stop script if errors
ynh_abort_if_errors
2017-01-05 23:37:07 +01:00
# Import common cmd
source ./_common.sh
# Retrieve app settings
domain=$(ynh_app_setting_get "$app" domain)
2017-07-21 22:11:45 +02:00
path=$(ynh_normalize_url_path $(ynh_app_setting_get "$app" path))
2017-01-05 23:37:07 +01:00
http_port=$(ynh_app_setting_get "$app" http_port)
nginx_status_port=$(ynh_app_setting_get "$app" nginx_status_port)
dbuser=$app
dbname=$app
dbpass=$(ynh_app_setting_get "$app" mysqlpwd)
2017-11-11 00:04:32 +01:00
# Stop services
systemctl stop monitorix.service
2017-10-31 23:08:23 +01:00
# Download package and install it
get_install_source
2017-01-05 23:37:07 +01:00
2017-07-21 22:11:45 +02:00
# Update nginx config
config_nginx
2017-01-05 23:37:07 +01:00
# Update monitorix configuration
2017-07-21 22:11:45 +02:00
config_monitorix
2017-01-05 23:37:07 +01:00
# Reload services
2017-11-11 00:04:32 +01:00
systemctl start monitorix.service