From b38904df4f671b5eb94ca8d61a885bcbee40aaea Mon Sep 17 00:00:00 2001 From: drunkendog Date: Fri, 23 Jun 2023 03:30:42 +0100 Subject: [PATCH] Add 'legacy/scripts/lxc.sh' --- legacy/scripts/lxc.sh | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 legacy/scripts/lxc.sh diff --git a/legacy/scripts/lxc.sh b/legacy/scripts/lxc.sh new file mode 100644 index 0000000..e88e1fd --- /dev/null +++ b/legacy/scripts/lxc.sh @@ -0,0 +1,8 @@ +#!/bin/bash +set -e + +# TODO: make it take arguments instead of environment variables +lxc launch ubuntu:18.04 $instance_name -c security.nesting=$nesting +lxc config device add $instance_name auto$instance_name proxy listen=$proto:$listen_ip:$external_port connect=$proto:127.0.0.1:$internal_port +sleep $wait | true # wait for network, TODO: more elegant solution +lxc exec $instance_name -- bash -c "$script" \ No newline at end of file