Open up gearman server port.
We'll need to be able to access this remotely. Change-Id: I6a4654fde2577203fe9c4e3d9ececa17c3a54590
This commit is contained in:
parent
543a2529fc
commit
bf13ddaef5
1
elements/gearman/element-deps
Normal file
1
elements/gearman/element-deps
Normal file
@ -0,0 +1 @@
|
||||
os-refresh-config
|
30
elements/gearman/os-refresh-config/pre-configure.d/97-gearman-iptables
Executable file
30
elements/gearman/os-refresh-config/pre-configure.d/97-gearman-iptables
Executable file
@ -0,0 +1,30 @@
|
||||
#!/bin/bash
|
||||
set -eu
|
||||
|
||||
OK=/opt/stack/gearman-iptables.ok
|
||||
|
||||
if [ -e $OK ] ; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
DISTRO=`lsb_release -si` || true
|
||||
|
||||
if [[ "Fedora" = $DISTRO ]]; then
|
||||
|
||||
# Check if the iptables service is active
|
||||
if systemctl is-active iptables.service ; then
|
||||
IPT_FILE=/etc/sysconfig/iptables
|
||||
if [ -f $IPT_FILE ]; then
|
||||
iptables-restore < $IPT_FILE
|
||||
fi
|
||||
|
||||
# Gearman server
|
||||
iptables -I INPUT -p tcp --dport 4730 -j ACCEPT
|
||||
|
||||
iptables-save > $IPT_FILE
|
||||
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
touch $OK
|
Loading…
Reference in New Issue
Block a user