Fix memcache listen port setting on debian-based OSes
On debian-based systems, we need to set "-l 0.0.0.0" in /etc/memcached.conf. This is to avoid memcached connection errors, for instance when running the Swift proxy code. RedHat-based systems already have this setting by default. Change-Id: Ie8837cffdff7d384cabf5deff7811eebd4968e2c
This commit is contained in:
parent
fc5467c849
commit
834d5aa613
@ -1,2 +1,7 @@
|
||||
Element to install memcached
|
||||
|
||||
On debian-based systems, we need to set "-l 0.0.0.0" in
|
||||
/etc/memcached.conf. This is to avoid memcached
|
||||
connection errors, for instance when running the Swift
|
||||
proxy code. RedHat-based systems already have this
|
||||
setting by default.
|
||||
|
@ -3,4 +3,12 @@
|
||||
set -eux
|
||||
|
||||
install-packages memcached
|
||||
|
||||
# On debian-based distros set memcached daemon to listen on port 0.0.0.0
|
||||
# This is the default on RedHat-based distros.
|
||||
# Without this setting the memcached daemon will suffer connection errors
|
||||
if [[ "ubuntu debian" =~ "$DISTRO_NAME" ]]; then
|
||||
sed -i -r "s/\-l( )*(([0-9]{1,3}\.){3}[0-9]{1,3})/\-l 0\.0\.0\.0/" /etc/memcached.conf
|
||||
fi
|
||||
|
||||
os-svc-enable -n memcached
|
||||
|
Loading…
Reference in New Issue
Block a user