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

Fix permission and fix monitorix config

This commit is contained in:
Josué Tille 2018-01-29 18:57:10 +01:00
parent 0278edbb34
commit 5a4b48b995
6 changed files with 20 additions and 2 deletions

View file

@ -300,6 +300,7 @@ secure_log_date_format = %b %e
# NET graph # NET graph
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
<net> <net>
max = 10
list = eth0 list = eth0
<desc> <desc>
eth0 = FastEthernet LAN, 0, 10000000 eth0 = FastEthernet LAN, 0, 10000000

View file

@ -14,7 +14,7 @@
"email": "josue@familletille.ch" "email": "josue@familletille.ch"
}, },
"requirements": { "requirements": {
"yunohost": ">= 2.6.4" "yunohost": ">= 2.7.9"
}, },
"multi_instance": false, "multi_instance": false,
"services": [ "services": [

View file

@ -54,4 +54,12 @@ config_monitorix() {
ynh_replace_string __MYSQL_USER__ $dbuser $monitorix_conf ynh_replace_string __MYSQL_USER__ $dbuser $monitorix_conf
ynh_replace_string MYSQL_PASSWORD $dbpass $monitorix_conf ynh_replace_string MYSQL_PASSWORD $dbpass $monitorix_conf
cp $monitorix_conf /etc/monitorix/monitorix.conf cp $monitorix_conf /etc/monitorix/monitorix.conf
}
set_permission() {
chown www-data:root -R /etc/monitorix
chmod u=rX,g=rwX,o= -R /etc/monitorix
chown www-data:root -R /var/lib/monitorix
chmod u=rwX,g=rwX,o= -R /var/lib/monitorix
} }

View file

@ -42,6 +42,9 @@ config_nginx
# Update monitorix configuration # Update monitorix configuration
config_monitorix config_monitorix
# Set access
set_permission
# register yunohost service # register yunohost service
yunohost service add monitorix yunohost service add monitorix

View file

@ -32,6 +32,9 @@ ynh_secure_remove /etc/monitorix # we remove the directory because if it is not
ynh_secure_remove /var/lib/monitorix ynh_secure_remove /var/lib/monitorix
ynh_restore ynh_restore
# Set access
set_permission
# Reload nginx # Reload nginx
systemctl reload nginx.service systemctl reload nginx.service

View file

@ -41,5 +41,8 @@ config_nginx
# Update monitorix configuration # Update monitorix configuration
config_monitorix config_monitorix
# Set access
set_permission
# Reload services # Reload services
systemctl start monitorix.service systemctl start monitorix.service