summaryrefslogtreecommitdiff
path: root/src/op_mode/generate_ipsec_debug_archive.sh
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2022-12-02 09:41:12 +0100
committerGitHub <noreply@github.com>2022-12-02 09:41:12 +0100
commitaec5295551efdaf6ba82b127d2fd6a6f1fcbf365 (patch)
tree281df429e54d4eca26dd5f5ef0623eed7d9129b1 /src/op_mode/generate_ipsec_debug_archive.sh
parente96e629fab3936c894214bef44155cb1bc671e4c (diff)
parent4245fd8fb1059d0a356e0fcb293fcbb923b09b68 (diff)
downloadvyos-1x-aec5295551efdaf6ba82b127d2fd6a6f1fcbf365.tar.gz
vyos-1x-aec5295551efdaf6ba82b127d2fd6a6f1fcbf365.zip
Merge pull request #1646 from mkorobeinikov/4767py
T4767: Rewrite generate ipsec archive to python
Diffstat (limited to 'src/op_mode/generate_ipsec_debug_archive.sh')
-rwxr-xr-xsrc/op_mode/generate_ipsec_debug_archive.sh36
1 files changed, 0 insertions, 36 deletions
diff --git a/src/op_mode/generate_ipsec_debug_archive.sh b/src/op_mode/generate_ipsec_debug_archive.sh
deleted file mode 100755
index 53d0a6eaa..000000000
--- a/src/op_mode/generate_ipsec_debug_archive.sh
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/usr/bin/env bash
-
-# Collecting IPSec Debug Information
-
-DATE=`date +%d-%m-%Y`
-
-a_CMD=(
- "sudo ipsec status"
- "sudo swanctl -L"
- "sudo swanctl -l"
- "sudo swanctl -P"
- "sudo ip x sa show"
- "sudo ip x policy show"
- "sudo ip tunnel show"
- "sudo ip address"
- "sudo ip rule show"
- "sudo ip route"
- "sudo ip route show table 220"
- )
-
-
-echo "DEBUG: ${DATE} on host \"$(hostname)\"" > /tmp/ipsec-status-${DATE}.txt
-date >> /tmp/ipsec-status-${DATE}.txt
-
-# Execute all DEBUG commands and save it to file
-for cmd in "${a_CMD[@]}"; do
- echo -e "\n### ${cmd} ###" >> /tmp/ipsec-status-${DATE}.txt
- ${cmd} >> /tmp/ipsec-status-${DATE}.txt 2>/dev/null
-done
-
-# Collect charon logs, build .tgz archive
-sudo journalctl /usr/lib/ipsec/charon > /tmp/journalctl-charon-${DATE}.txt && \
-sudo tar -zcvf /tmp/ipsec-debug-${DATE}.tgz /tmp/journalctl-charon-${DATE}.txt /tmp/ipsec-status-${DATE}.txt >& /dev/null
-sudo rm -f /tmp/journalctl-charon-${DATE}.txt /tmp/ipsec-status-${DATE}.txt
-
-echo "Debug file is generated and located in /tmp/ipsec-debug-${DATE}.tgz"