1
0
Fork 0
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:
Jimmy Monin 2022-07-05 08:48:13 +02:00
parent 5dff9b52b5
commit af0187c48f
2 changed files with 5 additions and 5 deletions

View file

@ -4,9 +4,9 @@
domain=$1
domain_label=${domain//\./_} # Replace "." by "_" for the domain label
# Add a web_log entry for this new domain
cat >> /opt/netdata/etc/netdata/python.d/web_log.conf <<EOF
${domain_label}_log:
name: '${domain_label}'
path: '/var/log/nginx/$domain-access.log'
cat >> /opt/netdata/etc/netdata/go.d/web_log.conf <<EOF
- ${domain_label}_log:
name: '${domain_label}'
path: '/var/log/nginx/$domain-access.log'
EOF

View file

@ -7,4 +7,4 @@ domain=$1
# by deleting every line between:
# - the domain label (with "." replaced by "_")
# - 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