#!/bin/bash L=/opt/zabbix/l2collector exec 7>/tmp/l2_full.lock flock -n 7 || exit 0 # skip if a full collection is running # Refresh the live JSON only. History is written exactly once by run_full.sh # after a successful full collection; this minute-level refresh must not add # duplicate snapshots. flock -n /tmp/l2_snap.lock /usr/bin/python3 $L/l2_snapshot.py >> /var/log/l2collector.log 2>&1 || true