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:
parent
0278edbb34
commit
5a4b48b995
6 changed files with 20 additions and 2 deletions
|
@ -29,7 +29,7 @@ base_cgi = __YNH_WWW_PATH__-cgi
|
||||||
host = localhost
|
host = localhost
|
||||||
port = __SERVICE_PORT__
|
port = __SERVICE_PORT__
|
||||||
user = www-data
|
user = www-data
|
||||||
group = nogroup
|
group = nogroup
|
||||||
log_file = /var/log/monitorix-httpd
|
log_file = /var/log/monitorix-httpd
|
||||||
hosts_deny =
|
hosts_deny =
|
||||||
hosts_allow =
|
hosts_allow =
|
||||||
|
@ -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
|
||||||
|
|
|
@ -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": [
|
||||||
|
|
|
@ -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
|
||||||
}
|
}
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue