Fix #1 start/stop/restart container fix
group/user fix. +Added tests to verify restart.
This commit is contained in:
Родитель
716a117a53
Коммит
18df3f34dc
|
@ -1,4 +1,5 @@
|
|||
set -eu
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
export TERM=xterm
|
||||
# Bash Colors
|
||||
red=`tput setaf 1`
|
||||
|
@ -40,8 +41,8 @@ system_pids() {
|
|||
chmod 777 /var/run/zabbix_server.pid /var/run/zabbix_agentd.pid /var/run/zabbix_java.pid
|
||||
}
|
||||
fix_permissions() {
|
||||
groupadd zabbix
|
||||
useradd -g zabbix zabbix
|
||||
getent group zabbix || groupadd zabbix
|
||||
getent passwd zabbix || useradd -g zabbix -M zabbix
|
||||
chown -R zabbix:zabbix /usr/local/etc/
|
||||
chown -R zabbix:zabbix /usr/local/src/zabbix/
|
||||
mkdir -p /usr/local/src/zabbix/frontends/php/conf/
|
||||
|
|
|
@ -24,3 +24,9 @@ test:
|
|||
- while true; do if grep "nginx entered RUNNING state" -a ${CIRCLE_ARTIFACTS}/zabbix.log; then break; else sleep 1; fi done
|
||||
# Check Zabbix Web interface status
|
||||
- curl -s -L --head http://127.0.0.1/ | grep "HTTP/1.1 200 OK"
|
||||
# Check if after restartting docker image server works.
|
||||
- docker restart zabbix
|
||||
- docker logs -f zabbix | tee -a ${CIRCLE_ARTIFACTS}/zabbix-after-restart.log:
|
||||
background: true
|
||||
- while true; do if grep "nginx entered RUNNING state" -a ${CIRCLE_ARTIFACTS}/zabbix-after-restart.log; then break; else sleep 1; fi done
|
||||
- curl -s -L --head http://127.0.0.1/ | grep "HTTP/1.1 200 OK"
|
Загрузка…
Ссылка в новой задаче