timeout 5 /usr/local/bin/wgctl fw list > /dev/null echo "exit: $?" exit: 0 All good there. Added the code to run_cmd, still the same issue stopping at fw list. But that's because it also returns 1, look: wgctl fw list --peer phone-nuno ──────────────────────────────────────────────── Firewall Rules (FORWARD) ──────────────────────────────────────────────── root@wireguard:/etc/wireguard/wgctl# echo $? 1 If we do it on a peer with rules, it returns 0: wgctl fw list --peer guest-zephyr ──────────────────────────────────────────────── Firewall Rules (FORWARD) ──────────────────────────────────────────────── 0 0 ACCEPT 6 -- * * 10.1.101.1 10.0.0.103 tcp dpt:53 1111 74244 ACCEPT 17 -- * * 10.1.101.1 10.0.0.103 udp dpt:53 345K 25M ACCEPT 0 -- * * 10.1.101.1 10.0.0.244 0 0 NFLOG 0 -- * * 10.1.101.1 10.0.0.0/24 nflog-prefix "wgctl-drop:" nflog-group 1 0 0 DROP 0 -- * * 10.1.101.1 10.0.0.0/24 root@wireguard:/etc/wireguard/wgctl# echo $? 0