Последняя активность 1 month ago

gistfile1.txt Исходник
1timeout 5 /usr/local/bin/wgctl fw list > /dev/null
2
3echo "exit: $?"
4
5exit: 0
6
7
8
9All good there.
10
11
12
13Added the code to run_cmd, still the same issue stopping at fw list.
14
15But that's because it also returns 1, look:
16
17wgctl fw list --peer phone-nuno
18
19────────────────────────────────────────────────
20
21 Firewall Rules (FORWARD)
22
23────────────────────────────────────────────────
24
25root@wireguard:/etc/wireguard/wgctl# echo $?
26
271
28
29
30
31If we do it on a peer with rules, it returns 0:
32
33wgctl fw list --peer guest-zephyr
34
35────────────────────────────────────────────────
36
37 Firewall Rules (FORWARD)
38
39────────────────────────────────────────────────
40
41 0 0 ACCEPT 6 -- * * 10.1.101.1 10.0.0.103 tcp dpt:53
42
43 1111 74244 ACCEPT 17 -- * * 10.1.101.1 10.0.0.103 udp dpt:53
44
45 345K 25M ACCEPT 0 -- * * 10.1.101.1 10.0.0.244
46
47 0 0 NFLOG 0 -- * * 10.1.101.1 10.0.0.0/24 nflog-prefix "wgctl-drop:" nflog-group 1
48
49 0 0 DROP 0 -- * * 10.1.101.1 10.0.0.0/24
50
51root@wireguard:/etc/wireguard/wgctl# echo $?
52
530