update check service for container

This commit is contained in:
vincent 2020-07-05 12:11:17 +02:00
parent 743a5e822d
commit c79178dea0

View File

@ -1,4 +1,5 @@
SERVICES=("syncthing@vincent" "named" "mariadb" "nginx" "php-fpm" "gitea" "tt-rss" "gunicorn-chainetv.socket" "gunicorn-supysonic" "rsyncd.service" "fail2ban" "supysonic-daemon" "home-assistant" "radicale") SERVICES=("syncthing@vincent" "mariadb" "nginx" "php-fpm" "gitea" "tt-rss" "gunicorn-chainetv.socket" "gunicorn-supysonic" "rsyncd.service" "fail2ban" "supysonic-daemon" "home-assistant" "radicale")
CONTAINER=("pihole")
HOST=$(hostname) HOST=$(hostname)
RED='\033[0;31m' RED='\033[0;31m'
GREEN='\033[0;32m' GREEN='\033[0;32m'
@ -21,3 +22,8 @@ do
fi fi
echo "" echo ""
done done
for container in ${CONTAINER[@]}
do
status=$(docker ps | grep $container >/dev/null && (echo active) || (echo inactive))
echo -e "$container is $status"
done