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

ci: Include commands between $()

parent ad222aad
......@@ -208,8 +208,8 @@ class SynnefoCI(object):
accept_ssh_from = self.config.get('Global', 'filter_access_network')
self.logger.debug("Block ssh except from %s" % accept_ssh_from)
cmd = """
local_ip=/sbin/ifconfig eth0 | grep 'inet addr:' | \
cut -d':' -f2 | cut -d' ' -f1
local_ip=$(/sbin/ifconfig eth0 | grep 'inet addr:' | \
cut -d':' -f2 | cut -d' ' -f1)
iptables -A INPUT -s localhost -j ACCEPT
iptables -A INPUT -s $local_ip -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