Debian Codegraph @

tools/ocft/apache

raw
1 # apache
2 # make sure that your apache configuration loads mod_status
3
4 CONFIG
5 Agent apache
6 AgentRoot /usr/lib/ocf/resource.d/heartbeat
7 InstallPackage apache2
8 HangTimeout 20
9
10 SETUP-AGENT
11 if systemctl list-unit-files 2>/dev/null | fgrep -q apache2.service; then
12 systemctl start apache2.service
13 systemctl stop apache2.service
14 else
15 /etc/init.d/apache2 start
16 /etc/init.d/apache2 stop
17 fi
18
19 CASE-BLOCK default_status
20 AgentRun stop
21
22 CASE-BLOCK prepare
23 Include default_status
24
25 CASE "check base env"
26 Include prepare
27 AgentRun start OCF_SUCCESS
28
29 CASE "check base env: set non-existing OCF_RESKEY_statusurl"
30 Include prepare
31 Env OCF_RESKEY_statusurl="yoyoyoyo"
32 AgentRun start OCF_ERR_GENERIC
33
34 CASE "check base env: set non-existing OCF_RESKEY_configfile"
35 Include prepare
36 Env OCF_RESKEY_configfile="/yoyoyoyo/nosuchfile"
37 AgentRun start OCF_ERR_INSTALLED
38
39 CASE "normal start"
40 Include prepare
41 AgentRun start OCF_SUCCESS
42
43 CASE "normal stop"
44 Include prepare
45 AgentRun start
46 AgentRun stop OCF_SUCCESS
47
48 CASE "double start"
49 Include prepare
50 AgentRun start
51 AgentRun start OCF_SUCCESS
52
53 CASE "double stop"
54 Include prepare
55 AgentRun stop OCF_SUCCESS
56
57 CASE "running monitor"
58 Include prepare
59 AgentRun start
60 AgentRun monitor OCF_SUCCESS
61
62 CASE "not running monitor"
63 Include prepare
64 AgentRun monitor OCF_NOT_RUNNING
65
66 CASE "unimplemented command"
67 Include prepare
68 AgentRun no_cmd OCF_ERR_UNIMPLEMENTED