2022-03-09 00:00:03 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
bool() {
|
|
|
|
case "$1" in
|
|
|
|
Y* | y* | true | TRUE | 1) return 0 ;;
|
|
|
|
esac
|
|
|
|
return 1
|
|
|
|
}
|
|
|
|
|
|
|
|
# If Redis is expressly disabled or the host is anything but localhost, disable Redis on this container.
|
2022-04-08 01:03:30 +02:00
|
|
|
ENABLE_REDIS=${ENABLE_REDIS:-true}
|
2022-03-09 00:00:03 +01:00
|
|
|
|
2022-04-08 01:03:30 +02:00
|
|
|
if [ "$REDIS_HOST" != "localhost" ] || ! bool "$ENABLE_REDIS"; then
|
2022-03-09 00:00:03 +01:00
|
|
|
echo "Redis is disabled or host is not localhost; disabling Redis..."
|
2022-05-26 03:49:09 +02:00
|
|
|
rm -rf /etc/supervisor/minimal.conf.d/redis.conf
|
2022-03-09 00:00:03 +01:00
|
|
|
fi
|