File tree 2 files changed +7
-8
lines changed
2 files changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -111,13 +111,6 @@ If you want to map another local directory (e.g. for backup or check scripts):
111
111
--volume <localdir>:/opt/backup
112
112
```
113
113
114
- If use external the volume you can used this volume by second. All
115
- settings, users, groups and etc will be saved.
116
-
117
- > * Note* : The mode with exist volume not support multisite
118
- > feature. Only one site - one container will be works.
119
-
120
-
121
114
## Test installation
122
115
123
116
Check the status of check_mk using:
Original file line number Diff line number Diff line change @@ -4,26 +4,31 @@ BASE_OMD="/opt/omd/sites"
4
4
5
5
# Init check_mk instance
6
6
if [ ! -d " ${BASE_OMD} /${CMK_SITE} " ] ; then
7
+
8
+ # Create new site
7
9
omd create ${CMK_SITE}
8
10
omd config ${CMK_SITE} set APACHE_TCP_ADDR 0.0.0.0
9
11
htpasswd -b -m /omd/sites/${CMK_SITE} /etc/htpasswd cmkadmin ${CMK_PASSWORD}
10
12
/opt/redirector.sh ${CMK_SITE} > /omd/sites/${CMK_SITE} /var/www/index.html
11
13
12
14
# Save omd record about tmpfs for second use
13
15
grep omd /etc/fstab > ${BASE_OMD} /${CMK_SITE} /.fstab.tmpfs
16
+
14
17
else
18
+
15
19
# Create user and group for using existing site with new container
16
20
useradd -M -c " OMD site ${CMK_SITE} " -b " /omd/sites" -U -G omd ${CMK_SITE}
17
21
usermod -aG ${CMK_SITE} apache
18
22
chown -R ${CMK_SITE} :${CMK_SITE} ${BASE_OMD} /${CMK_SITE}
23
+
19
24
# Restore tmpfs
20
25
cat ${BASE_OMD} /${CMK_SITE} /.fstab.tmpfs >> /etc/fstab
21
26
mount tmpfs
22
27
omd enable ${CMK_SITE}
23
28
fi
24
29
25
30
26
- # This link needs always
31
+ # This link is always needed
27
32
ln -s " /omd/sites/${CMK_SITE} /var/log/nagios.log" /var/log/nagios.log
28
33
29
34
@@ -45,3 +50,4 @@ chown root:mail $CFGFILE
45
50
46
51
# Start check_mk
47
52
omd start && tail -f /var/log/nagios.log
53
+
You can’t perform that action at this time.
0 commit comments