#!/bin/sh SOCK=/run/tproxy/socket if [[ ! -S $SOCK ]]; then echo "tproxy service not running" exit 1 fi if [[ $# -lt 1 ]]; then echo "usage: $0 {start|stop|status|exit} [name]" exit 1 fi # Send all arguments joined by spaces echo "$*" | nc -U "$SOCK"