-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathstart_zabbix_from_atos_dockerhub.sh
executable file
·35 lines (27 loc) · 1.27 KB
/
start_zabbix_from_atos_dockerhub.sh
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
#!/bin/sh
chmod uo+w zabbix/server/externalscripts/openbmc
set -euo pipefail
if filename=$(readlink /etc/localtime); then
# /etc/localtime is a symlink as expected
export timezone=${filename#*zoneinfo/}
if [[ $timezone = "$filename" || ! $timezone =~ ^[^/]+/[^/]+$ ]]; then
# not pointing to expected location or not Region/City
>&2 echo "$filename points to an unexpected location"
exit 1
fi
else # compare files by contents
# https://stackoverflow.com/questions/12521114/getting-the-canonical-time-zone-name-in-shell-script#comment88637393_12523283
export timezone=$(find /usr/share/zoneinfo -type f ! -regex ".*/Etc/.*" -exec cmp -s {} /etc/localtime \; -print | sed -e 's@.*/zoneinfo/@@' | head -n1)
fi
echo $timezone
. ./proxy.sh
. ./versions.sh
export always_or_no=always
./update_zabbix_containers_restart_option.sh
echo "starting MISM containers ...."
docker-compose -f docker_compose_zabbix_from_atos_dockerhub.yml up -d
echo "----------------------------------------------------------------"
echo "Zabbix is available on https://localhost:4443"
echo "for more info, refer to github site "
echo "https://github.com/atosorigin/bullsequana-edge-system-management"
echo "----------------------------------------------------------------"