From dfdc54af819c6ce9b4e150c30913967365bc7f32 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 29 Sep 2021 12:24:32 -0400 Subject: working static config into template --- keycopy.sh | 49 +++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 47 insertions(+), 2 deletions(-) (limited to 'keycopy.sh') diff --git a/keycopy.sh b/keycopy.sh index f7779b4..9f2f435 100644 --- a/keycopy.sh +++ b/keycopy.sh @@ -23,11 +23,56 @@ nocomments() sed 's/#.*//; /^ *$/d' } + +write_config() +{ + conn=$1 + remote_addrs=$2 + id=$3 + cat > /etc/swanctl/conf.d/"$conn".conf <