1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/netdata_ynh.git synced 2024-09-03 19:46:33 +02:00
netdata_ynh/hooks/post_domain_remove
2022-07-05 08:48:13 +02:00

10 lines
396 B
Bash

#!/bin/bash
# Retrieve arguments
domain=$1
# Look for the domain entry, and delete the related lines
# 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/go.d/web_log.conf