machine_setup/ansible/roles/jail/files/setup_netgraph_homeserver

24 lines
400 B
Bash

#!/usr/local/bin/bash
cleanup() {
/usr/local/bin/jail_netgraph_bridge stop cloak dagger
}
setup_netgraph_start() {
cleanup
/usr/local/bin/jail_netgraph_bridge start cloak dagger 192.168.1.0/24
}
setup_netgraph_stop() {
cleanup
}
if [ "$1" = "start" ]; then
setup_netgraph_start
elif [ "$1" = "stop" ]; then
setup_netgraph_stop
else
>&2 echo "Unrecognized command"
fi