diff options
author | Andrew Cady <d@samizdat> | 2021-09-29 03:42:15 -0400 |
---|---|---|
committer | Andrew Cady <d@samizdat> | 2021-09-29 03:42:15 -0400 |
commit | 1943a248f84a1ea05ac79a29d52ab4f2e975e3d5 (patch) | |
tree | 9d673969f063dc37f1419467285ea59d161f42e4 /keycopy.sh | |
parent | f0580823e871ff0d92c2186df66cc1b89b49800e (diff) |
keycopy.sh: forget about old config
Diffstat (limited to 'keycopy.sh')
-rw-r--r-- | keycopy.sh | 17 |
1 files changed, 0 insertions, 17 deletions
@@ -23,24 +23,9 @@ nocomments() | |||
23 | sed 's/#.*//; /^ *$/d' | 23 | sed 's/#.*//; /^ *$/d' |
24 | } | 24 | } |
25 | 25 | ||
26 | |||
27 | test_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 | |||
40 | test_new_config() | 26 | test_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 | ||
54 | test_old_config | ||
55 | test_new_config | 38 | test_new_config |
56 | 39 | ||