mirror of
https://github.com/mynodebtc/mynode.git
synced 2024-12-26 14:34:00 +00:00
Move debug tarball to script and add more data
This commit is contained in:
parent
28a647d0c2
commit
aac19b36bb
27
rootfs/standard/usr/bin/mynode_gen_debug_tarball.sh
Executable file
27
rootfs/standard/usr/bin/mynode_gen_debug_tarball.sh
Executable file
|
@ -0,0 +1,27 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -x
|
||||
|
||||
# Clean space for tarball + setup
|
||||
rm -rf /tmp/mynode_logs.tar.gz
|
||||
rm -rf /tmp/mynode_info/
|
||||
mkdir -p /tmp/mynode_info/
|
||||
|
||||
# Save helpful info
|
||||
mynode-get-quicksync-status > /tmp/mynode_info/quicksync_state.txt
|
||||
cp /usr/share/mynode/version /tmp/mynode_info/version
|
||||
cp -rf /home/admin/upgrade_logs /tmp/mynode_info/
|
||||
cp /mnt/hdd/mynode/bitcoin/debug.log /tmp/mynode_info/bitcoin_debug.log
|
||||
|
||||
echo "" > /tmp/mynode_info/device_info
|
||||
echo "##### df -h #####" >> /tmp/mynode_info/device_info
|
||||
df -h >> /tmp/mynode_info/device_info
|
||||
echo "" >> /tmp/mynode_info/device_info
|
||||
echo "##### mount #####" >> /tmp/mynode_info/device_info
|
||||
mount >> /tmp/mynode_info/device_info
|
||||
echo "" >> /tmp/mynode_info/device_info
|
||||
echo "##### docker ps #####" >> /tmp/mynode_info/device_info
|
||||
docker ps >> /tmp/mynode_info/device_info
|
||||
|
||||
# Create tarball
|
||||
tar -czvf /tmp/mynode_logs.tar.gz /var/log/ /tmp/mynode_info/
|
|
@ -373,14 +373,9 @@ def page_reset_tor():
|
|||
@mynode_settings.route("/settings/mynode_logs.tar.gz")
|
||||
def download_logs_page():
|
||||
check_logged_in()
|
||||
os.system("rm -rf /tmp/mynode_logs.tar.gz")
|
||||
os.system("rm -rf /tmp/mynode_info/")
|
||||
os.system("mkdir -p /tmp/mynode_info/")
|
||||
os.system("mynode-get-quicksync-status > /tmp/mynode_info/quicksync_state.txt")
|
||||
os.system("cp /usr/share/mynode/version /tmp/mynode_info/version")
|
||||
os.system("cp -rf /home/admin/upgrade_logs /tmp/mynode_info/")
|
||||
os.system("cp /mnt/hdd/mynode/bitcoin/debug.log /tmp/mynode_info/bitcoin_debug.log")
|
||||
os.system("tar -czvf /tmp/mynode_logs.tar.gz /var/log/ /tmp/mynode_info/")
|
||||
|
||||
os.system("/usr/bin/mynode_gen_debug_tarball.sh")
|
||||
|
||||
return send_from_directory(directory="/tmp/", filename="mynode_logs.tar.gz")
|
||||
|
||||
@mynode_settings.route("/settings/repair-drive")
|
||||
|
|
Loading…
Reference in New Issue
Block a user