#!/bin/bash function check() { PREFIX="recipe:redis:check" container_running "$CONTAINER" || return 10 echo "checking redis regarding access to its ip address <$REDIS_IP>..." lxc exec "$CONTAINER" -- bash </dev/null ss -tlnp | grep redis | grep -q $REDIS_IP:6379 test -f /etc/redis/redis.conf grep -Eq "^protected-mode no" /etc/redis/redis.conf EOF status="$?" [[ $status -eq 0 ]] && echo "container <$CONTAINER> approved!" return $status } function install() { PREFIX="recipe:redis:install" : "$PREFIX" credential_redis=$(load_yaml_from_expanded credential.redis) echowarn "initializing redis regarding access to its IP address <$REDIS_IP>..." launch_container "$CONTAINER" lxc exec "$CONTAINER" -- bash <