mirror of
https://github.com/YunoHost-Apps/monitorix_ynh.git
synced 2024-09-03 19:46:06 +02:00
Change cgi url
This commit is contained in:
parent
74020855ba
commit
6cda38f6db
5 changed files with 31 additions and 9 deletions
|
@ -22,7 +22,7 @@ include_dir = /etc/monitorix/conf.d
|
|||
base_dir = /var/lib/monitorix/www/
|
||||
base_lib = /var/lib/monitorix/
|
||||
base_url = __YNH_WWW_PATH__
|
||||
base_cgi = __YNH_WWW_PATH__-cgi
|
||||
base_cgi = __YNH_WWW_PATH__/cgi
|
||||
|
||||
<httpd_builtin>
|
||||
enabled = y
|
||||
|
|
|
@ -65,10 +65,17 @@ fi
|
|||
|
||||
# Update Monitorix Config
|
||||
ynh_replace_string "base_url = $old_path" "base_url = $new_path" /etc/monitorix/monitorix.conf
|
||||
ynh_replace_string "base_cgi = $old_path-cgi" "base_cgi = $new_path-cgi" /etc/monitorix/monitorix.conf
|
||||
ynh_replace_string "base_cgi = $old_path/cgi" "base_cgi = $new_path/cgi" /etc/monitorix/monitorix.conf
|
||||
ynh_replace_string "url_prefix = http://127.0.0.1:$http_port$old_path" "url_prefix = http://127.0.0.1:$http_port$new_path" /etc/monitorix/monitorix.conf
|
||||
ynh_replace_string "from_address = noreply@$old_domain" "from_address = noreply@$new_domain" /etc/monitorix/monitorix.conf
|
||||
|
||||
# Reload services
|
||||
sudo systemctl reload nginx.service
|
||||
sudo systemctl restart monitorix.service
|
||||
|
||||
# Reload monitorix
|
||||
# While we call "restart" sometime for unknown reason monitorix don't cleanly restart. Probably on the stop instruction the webserver is not stoped before the new start instruction.
|
||||
# So this fix that
|
||||
sudo systemctl stop monitorix.service
|
||||
sleep 1
|
||||
sudo systemctl start monitorix.service
|
||||
sleep 10
|
|
@ -65,5 +65,10 @@ set_permission
|
|||
# register yunohost service
|
||||
yunohost service add monitorix
|
||||
|
||||
# Reload services
|
||||
systemctl restart monitorix.service
|
||||
# Reload monitorix
|
||||
# While we call "restart" sometime for unknown reason monitorix don't cleanly restart. Probably on the stop instruction the webserver is not stoped before the new start instruction.
|
||||
# So this fix that
|
||||
sudo systemctl stop monitorix.service
|
||||
sleep 1
|
||||
sudo systemctl start monitorix.service
|
||||
sleep 10
|
||||
|
|
|
@ -51,5 +51,10 @@ set_permission
|
|||
# Reload nginx
|
||||
systemctl reload nginx.service
|
||||
|
||||
# Reload services
|
||||
systemctl restart monitorix.service
|
||||
# Reload monitorix
|
||||
# While we call "restart" sometime for unknown reason monitorix don't cleanly restart. Probably on the stop instruction the webserver is not stoped before the new start instruction.
|
||||
# So this fix that
|
||||
sudo systemctl stop monitorix.service
|
||||
sleep 1
|
||||
sudo systemctl start monitorix.service
|
||||
sleep 10
|
|
@ -59,5 +59,10 @@ cp ../conf/post_iptable_rules_hook /usr/share/yunohost/hooks/post_iptable_rules/
|
|||
# Set access
|
||||
set_permission
|
||||
|
||||
# Reload services
|
||||
systemctl start monitorix.service
|
||||
# Reload monitorix
|
||||
# While we call "restart" sometime for unknown reason monitorix don't cleanly restart. Probably on the stop instruction the webserver is not stoped before the new start instruction.
|
||||
# So this fix that
|
||||
sudo systemctl stop monitorix.service
|
||||
sleep 1
|
||||
sudo systemctl start monitorix.service
|
||||
sleep 10
|
||||
|
|
Loading…
Reference in a new issue