diff --git a/conf/monitorix.conf b/conf/monitorix.conf index 80ddc3b..483b9a9 100644 --- a/conf/monitorix.conf +++ b/conf/monitorix.conf @@ -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 # ----------------------------------------------------------------------------- + max = 10 list = eth0 eth0 = FastEthernet LAN, 0, 10000000 diff --git a/manifest.json b/manifest.json index fdbb9c7..f25b79d 100644 --- a/manifest.json +++ b/manifest.json @@ -14,7 +14,7 @@ "email": "josue@familletille.ch" }, "requirements": { - "yunohost": ">= 2.6.4" + "yunohost": ">= 2.7.9" }, "multi_instance": false, "services": [ diff --git a/scripts/_common.sh b/scripts/_common.sh index 34d15ec..cac6df0 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -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 } \ No newline at end of file diff --git a/scripts/install b/scripts/install index 3cdf28a..1f08918 100755 --- a/scripts/install +++ b/scripts/install @@ -42,6 +42,9 @@ config_nginx # Update monitorix configuration config_monitorix +# Set access +set_permission + # register yunohost service yunohost service add monitorix diff --git a/scripts/restore b/scripts/restore index c396654..adb75d0 100755 --- a/scripts/restore +++ b/scripts/restore @@ -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 diff --git a/scripts/upgrade b/scripts/upgrade index 00c4344..f965977 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -41,5 +41,8 @@ config_nginx # Update monitorix configuration config_monitorix +# Set access +set_permission + # Reload services systemctl start monitorix.service