Skip to content

Instantly share code, notes, and snippets.

@sesukovs
sesukovs / zbx_domain_list.sh
Created February 19, 2017 16:55
Bash script that creates JSON document for Zabbix discovery
#!/bin/bash
VHOST_CONFIG_PATH='/etc/nginx/sites-enabled/'
echo "{"
echo ' "data":['
FIRST=1
while read line; do
if [ $FIRST != 0 ]; then
FIRST=0
else