diff options
author | Xiao Pan <gky44px1999@gmail.com> | 2023-12-03 02:16:02 -0800 |
---|---|---|
committer | Xiao Pan <gky44px1999@gmail.com> | 2023-12-03 02:16:02 -0800 |
commit | 42fd23d7793f234a9b340256f7a311d9c1222990 (patch) | |
tree | 6b759bf0ee400e5fc73c4b44b8553dc2126b2688 /sh | |
parent | 901f31b19bb744c73f74445846d6522e09bc0bfb (diff) |
update
Diffstat (limited to 'sh')
-rw-r--r-- | sh/snippets | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sh/snippets b/sh/snippets index 6836083..800acf2 100644 --- a/sh/snippets +++ b/sh/snippets @@ -53,3 +53,15 @@ EOF # use cd to workaround monero-blockchain-export.log log file save in current dir? issue, haven't tested cd "$HOME/.bitmonero" || exit monero-blockchain-export --output-file "$XDG_DOWNLOAD_DIR/xmr/monero_blockchain.raw" + +nm_device_state="$(nmcli -t --fields device,state device)" +if echo "$nm_device_state" | grep -q '^wg_ka:connected$'; then + echo ka +elif echo "$nm_device_state" | grep -q '^wg_studio:connected$'; then + echo studio +else + echo insp +fi +printf 'default: '; curl ifconfig.co +printf '4: '; curl -4 ifconfig.co +printf '6: '; curl -6 ifconfig.co |