Debian Codegraph @

tools/ocft/Xinetd

raw
1 # Xinetd
2
3 CONFIG
4 Agent Xinetd
5 AgentRoot /usr/lib/ocf/resource.d/heartbeat
6 InstallPackage xinetd
7
8 SETUP-AGENT
9 sed -i /disable/s/yes/no/ /etc/xinetd.d/echo
10 if which /etc/init.d/xinetd >/dev/null 2>&1; then
11 /etc/init.d/xinetd start
12 elif systemctl list-unit-files | grep -qs xinetd; then
13 systemctl start xinetd
14 fi
15
16 CASE-BLOCK required_args
17 Env OCF_RESKEY_service=discard
18
19 CASE-BLOCK default_status
20 AgentRun stop
21
22 CASE-BLOCK prepare
23 Include required_args
24 Include default_status
25
26 CASE "check base env"
27 Include prepare
28 AgentRun start OCF_SUCCESS
29
30 CASE "check base env: unset 'OCF_RESKEY_protocol'"
31 Include prepare
32 Unenv OCF_RESKEY_service
33 AgentRun start OCF_ERR_CONFIGURED
34
35 CASE "normal start"
36 Include prepare
37 AgentRun start OCF_SUCCESS
38
39 CASE "normal stop"
40 Include prepare
41 AgentRun start
42 AgentRun stop OCF_SUCCESS
43
44 CASE "double start"
45 Include prepare
46 AgentRun start
47 AgentRun start OCF_SUCCESS
48
49 CASE "double stop"
50 Include prepare
51 AgentRun stop OCF_SUCCESS
52
53 CASE "monitor with running"
54 Include prepare
55 AgentRun start
56 AgentRun monitor OCF_SUCCESS
57
58 CASE "monitor with not running"
59 Include prepare
60 AgentRun monitor OCF_NOT_RUNNING
61
62 CASE "unimplemented command"
63 Include prepare
64 AgentRun no_cmd OCF_ERR_UNIMPLEMENTED