diff options
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 | ||