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

@ -29,7 +29,7 @@ base_cgi = __YNH_WWW_PATH__-cgi
host = localhost
port = __SERVICE_PORT__
user = www-data
group = nogroup
group = nogroup
log_file = /var/log/monitorix-httpd
hosts_deny =
hosts_allow =
@ -300,6 +300,7 @@ secure_log_date_format = %b %e
# NET graph
# -----------------------------------------------------------------------------
<net>
max = 10
list = eth0
<desc>
eth0 = FastEthernet LAN, 0, 10000000

View file

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

View file

@ -54,4 +54,12 @@ config_monitorix() {
ynh_replace_string __MYSQL_USER__ $dbuser $monitorix_conf
ynh_replace_string MYSQL_PASSWORD $dbpass $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
config_monitorix
# Set access
set_permission
# register yunohost service
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_restore
# Set access
set_permission
# Reload nginx
systemctl reload nginx.service

View file

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