-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathipsec-update-logic.txt
64 lines (46 loc) · 1.04 KB
/
ipsec-update-logic.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
Script logic
access = public/public
If disabled we should force access = private but this wouldn't get picked on service restart up as the templates are already expanded
Currently disabled
Here is a list of the rough logic in the ipsec-update script.
Stopped & Disabled
# expand-templates
If stopped & disabled
set access private
stop ipsec service
reset redirects
# restart services
Stopped & Enabled
# expand-templates
If stopped & enabled
set access public
reset redirects
# restart services
Started
# expand-templates
set access public
If started and enabled
reset redirects
Check previous status
Reread secrets
If en-en
auto replace
If start
auto --up
changestate
Elseif disabled-disabled
stop
changestate
Elseif disabled-enabled
auto --replace
If start
auto --up
changestate
Elseif enabled-disabled
stop
changestate
If not started and enabled
reset redirects
set access public
start service
# restart services