mirror of
https://github.com/YunoHost-Apps/monitorix_ynh.git
synced 2024-09-03 19:46:06 +02:00
35 lines
758 B
Bash
Executable file
35 lines
758 B
Bash
Executable file
#!/bin/bash
|
|
|
|
# Source YunoHost helpers
|
|
source /usr/share/yunohost/helpers
|
|
|
|
# Stop script if errors
|
|
ynh_abort_if_errors
|
|
|
|
# Import common cmd
|
|
source ./_common.sh
|
|
|
|
# Retrieve app settings
|
|
domain=$(ynh_app_setting_get "$app" domain)
|
|
path=$(ynh_normalize_url_path $(ynh_app_setting_get "$app" path))
|
|
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)
|
|
|
|
# Download package
|
|
get_source
|
|
|
|
# Update package
|
|
dpkg -i /tmp/monitorix.deb
|
|
ynh_secure_remove /etc/monitorix/conf.d/00-debian.conf
|
|
|
|
# Update nginx config
|
|
config_nginx
|
|
|
|
# Update monitorix configuration
|
|
config_monitorix
|
|
|
|
# Reload services
|
|
systemctl restart monitorix.service
|