mirror of
https://github.com/YunoHost-Apps/netdata_ynh.git
synced 2024-09-03 19:46:33 +02:00
Update domain hooks
This commit is contained in:
parent
5dff9b52b5
commit
af0187c48f
2 changed files with 5 additions and 5 deletions
|
@ -4,9 +4,9 @@
|
||||||
domain=$1
|
domain=$1
|
||||||
domain_label=${domain//\./_} # Replace "." by "_" for the domain label
|
domain_label=${domain//\./_} # Replace "." by "_" for the domain label
|
||||||
# Add a web_log entry for this new domain
|
# Add a web_log entry for this new domain
|
||||||
cat >> /opt/netdata/etc/netdata/python.d/web_log.conf <<EOF
|
cat >> /opt/netdata/etc/netdata/go.d/web_log.conf <<EOF
|
||||||
${domain_label}_log:
|
- ${domain_label}_log:
|
||||||
name: '${domain_label}'
|
name: '${domain_label}'
|
||||||
path: '/var/log/nginx/$domain-access.log'
|
path: '/var/log/nginx/$domain-access.log'
|
||||||
|
|
||||||
EOF
|
EOF
|
|
@ -7,4 +7,4 @@ domain=$1
|
||||||
# by deleting every line between:
|
# by deleting every line between:
|
||||||
# - the domain label (with "." replaced by "_")
|
# - the domain label (with "." replaced by "_")
|
||||||
# - and the domain file specification (need to replace "." by "\." in order not to get interpreted by sed)
|
# - and the domain file specification (need to replace "." by "\." in order not to get interpreted by sed)
|
||||||
sed --in-place "/${domain//\./_}_log/,/${domain//\./\\\.}/d" /opt/netdata/etc/netdata/python.d/web_log.conf
|
sed --in-place "/${domain//\./_}_log/,/${domain//\./\\\.}/d" /opt/netdata/etc/netdata/go.d/web_log.conf
|
||||||
|
|
Loading…
Add table
Reference in a new issue