Fix teardown logic bug

This commit is contained in:
Jamil Bou Kheir
2021-10-18 11:17:38 -07:00
parent af3ecde100
commit e52d2f2408

View File

@@ -17,7 +17,7 @@ nft_path = "#{node['firezone']['install_directory']}/embedded/sbin/nft"
# Delete wireguard interface if exists
wg_exists = Mixlib::ShellOut.new("ip link show dev #{wg_interface}")
wg_exists.run_command
if wg_exists.status.exitstatus == 1
if wg_exists.status.exitstatus.zero?
execute 'delete_wireguard_interface' do
command "ip link delete dev #{wg_interface}"
end