backup-manager/monitor-test.sh.j2

17 lines
275 B
Text
Raw Permalink Normal View History

2025-08-15 23:09:48 +02:00
#!/bin/bash
# Usage: ./execute_command_client.sh <command>
if [ $# -ne 1 ]; then
echo "Usage: $0 <command>"
exit 1
fi
command="$1"
# Connect to socket and send command
output=$(nc -U {{ statedir }}/{{ name }}.monitoring <<< "$command")
# Print output
echo "$output"