Commit b3cc9fef authored by Ilias Tsitsimpis's avatar Ilias Tsitsimpis Committed by Christos Stavrakakis
Browse files

ci: Include commands between $()

parent ad222aad
...@@ -208,8 +208,8 @@ class SynnefoCI(object): ...@@ -208,8 +208,8 @@ class SynnefoCI(object):
accept_ssh_from = self.config.get('Global', 'filter_access_network') accept_ssh_from = self.config.get('Global', 'filter_access_network')
self.logger.debug("Block ssh except from %s" % accept_ssh_from) self.logger.debug("Block ssh except from %s" % accept_ssh_from)
cmd = """ cmd = """
local_ip=/sbin/ifconfig eth0 | grep 'inet addr:' | \ local_ip=$(/sbin/ifconfig eth0 | grep 'inet addr:' | \
cut -d':' -f2 | cut -d' ' -f1 cut -d':' -f2 | cut -d' ' -f1)
iptables -A INPUT -s localhost -j ACCEPT iptables -A INPUT -s localhost -j ACCEPT
iptables -A INPUT -s $local_ip -j ACCEPT iptables -A INPUT -s $local_ip -j ACCEPT
iptables -A INPUT -s {0} -p tcp --dport 22 -j ACCEPT iptables -A INPUT -s {0} -p tcp --dport 22 -j ACCEPT
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment