summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Cady <d@samizdat>2021-09-29 03:42:15 -0400
committerAndrew Cady <d@samizdat>2021-09-29 03:42:15 -0400
commit1943a248f84a1ea05ac79a29d52ab4f2e975e3d5 (patch)
tree9d673969f063dc37f1419467285ea59d161f42e4
parentf0580823e871ff0d92c2186df66cc1b89b49800e (diff)
keycopy.sh: forget about old config
-rw-r--r--keycopy.sh17
1 files changed, 0 insertions, 17 deletions
diff --git a/keycopy.sh b/keycopy.sh
index f9ebbb9..f7779b4 100644
--- a/keycopy.sh
+++ b/keycopy.sh
@@ -23,24 +23,9 @@ nocomments()
23 sed 's/#.*//; /^ *$/d' 23 sed 's/#.*//; /^ *$/d'
24} 24}
25 25
26
27test_old_config()
28{
29 ipsec stop
30 rm -f /etc/swanctl/conf.d/andy.conf
31 cp ipsec.conf /etc/
32 nocomments < ipsec.conf
33 ipsec start
34 sleep 2
35 ipsec listpubkeys
36 ipsec up andy
37 ipsec stop
38}
39
40test_new_config() 26test_new_config()
41{ 27{
42 ipsec stop 28 ipsec stop
43 cp -T ipsec.conf.empty /etc/ipsec.conf
44 cp andy.conf /etc/swanctl/conf.d/ 29 cp andy.conf /etc/swanctl/conf.d/
45 nocomments < andy.conf 30 nocomments < andy.conf
46 ipsec start 31 ipsec start
@@ -48,9 +33,7 @@ test_new_config()
48 swanctl -c 33 swanctl -c
49 ipsec listpubkeys 34 ipsec listpubkeys
50 ipsec up andy 35 ipsec up andy
51 ipsec stop
52} 36}
53 37
54test_old_config
55test_new_config 38test_new_config
56 39