Adding SSL support to eole-redis.
Ubuntu don't build redis with SSL support so we use Stunnel to fill the gap. Here we add Stunnel full EOLE integration and Redis specifics. Maybe later we will want to have a specific package for eole-stunnel. ref #30338
This commit is contained in:
30
diagnose/70_redis
Normal file
30
diagnose/70_redis
Normal file
@ -0,0 +1,30 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ $(CreoleGet activer_redis) = "oui" ];then
|
||||
. /usr/lib/eole/diagnose.sh
|
||||
|
||||
EchoGras "*** Service Redis"
|
||||
nbIface=$(CreoleGet nombre_interfaces)
|
||||
ssl=$(CreoleGet redisSSL non)
|
||||
if [ ${nbIface} -eq 1 ]
|
||||
then
|
||||
TestService "Redis master iface 0" $(CreoleGet "adresse_ip_eth0"):$(CreoleGet "redisPort")
|
||||
if [ ${ssl} = "oui" ]
|
||||
then
|
||||
TestService "Redis master SSL iface 0" $(CreoleGet "adresse_ip_eth0"):$(CreoleGet "redisSSLPort")
|
||||
fi
|
||||
echo
|
||||
else
|
||||
for iface in $(seq 0 ${nbIface})
|
||||
do
|
||||
TestService "Redis master iface ${iface}" $(CreoleGet "adresse_ip_eth${iface}"):$(CreoleGet "redisPort")
|
||||
if [ ${ssl} = "oui" ]
|
||||
then
|
||||
TestService "Redis master SSL iface ${iface}" $(CreoleGet "adresse_ip_eth0"):$(CreoleGet "redisSSLPort")
|
||||
fi
|
||||
echo
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
||||
exit 0
|
23
diagnose/70_stunnel
Normal file
23
diagnose/70_stunnel
Normal file
@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ $(CreoleGet activer_stunnel) = "oui" ];then
|
||||
if [ $(CreoleGet stunnel_add_tunnels non ) = "oui" ];then
|
||||
. /usr/lib/eole/diagnose.sh
|
||||
|
||||
EchoGras "*** Service Stunnel"
|
||||
name=($(CreoleGet stunnel_name))
|
||||
acc_ip=($(CreoleGet stunnel_accept_ip))
|
||||
acc_port=($(CreoleGet stunnel_accept_port))
|
||||
conn_ip=($(CreoleGet stunnel_connect_ip))
|
||||
conn_port=($(CreoleGet stunnel_connect_port))
|
||||
|
||||
len=${#name[@]}
|
||||
for (( i=0; i<$len; i++ ))
|
||||
do
|
||||
TestService "Tunnel ${name[$i]}: ${acc_ip}:${acc_port} => ${conn_ip}:${conn_port}" ${acc_ip}:${acc_port}
|
||||
done
|
||||
echo
|
||||
fi
|
||||
fi
|
||||
|
||||
exit 0
|
Reference in New Issue
Block a user