-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathchecks.sh
More file actions
executable file
·30 lines (24 loc) · 1.04 KB
/
checks.sh
File metadata and controls
executable file
·30 lines (24 loc) · 1.04 KB
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
#!/bin/bash
if hash sv >/dev/null 2>&1; then
check "php-fpm is running" sudo sh -c 'sv status php-fpm | grep -E ^run:'
sudo sv stop php-fpm
check "php-fpm is stopped" sudo sh -c 'sv status php-fpm | grep -E ^down:'
sudo sv start php-fpm
check "php-fpm is running" sudo sh -c 'sv status php-fpm | grep -E ^run:'
else
check "php-fpm is running" pgrep php-fpm
fi
sleep 1
check "Port 9000 is open" sh -c 'netstat -lnt | grep :9000 '
check "php can run" php --version
check "php-fpm configuration" sudo php-fpm -t
check "composer can run" composer --version
check "mailpit is running" pgrep mailpit
check "Port 1025 is open" sh -c 'netstat -lnt | grep :1025 '
check "Port 8025 is open" sh -c 'netstat -lnt | grep :8025 '
check "VIP CLI can run" vip --version
# Microsoft's base images contain zsh. We don't want to run this check for MS images because we have no control over the installed services.
if test -d /etc/rc2.d && ! test -e /usr/bin/zsh; then
dir="$(ls -1 /etc/rc2.d)"
check "/etc/rc2.d is empty" test -z "${dir}"
fi