devstack/lib/neutron_plugins/services/vpn
Ian Wienand aee18c749b Enforce function declaration format in bash8
Check that function calls look like ^function foo {$ in bash8, and fix
all existing failures of that check.  Add a note to HACKING.rst

Change-Id: Ic19eecb39e0b20273d1bcd551a42fe400d54e938
2014-02-28 07:59:03 +11:00

34 lines
751 B
Plaintext

# Neutron VPN plugin
# ---------------------------
# Save trace setting
MY_XTRACE=$(set +o | grep xtrace)
set +o xtrace
AGENT_VPN_BINARY="$NEUTRON_BIN_DIR/neutron-vpn-agent"
VPN_PLUGIN="neutron.services.vpn.plugin.VPNDriverPlugin"
IPSEC_PACKAGE=${IPSEC_PACKAGE:-"openswan"}
function neutron_vpn_install_agent_packages {
install_package $IPSEC_PACKAGE
}
function neutron_vpn_configure_common {
_neutron_service_plugin_class_add $VPN_PLUGIN
}
function neutron_vpn_stop {
local ipsec_data_dir=$DATA_DIR/neutron/ipsec
local pids
if [ -d $ipsec_data_dir ]; then
pids=$(find $ipsec_data_dir -name 'pluto.pid' -exec cat {} \;)
fi
if [ -n "$pids" ]; then
sudo kill $pids
fi
}
# Restore xtrace
$MY_XTRACE