mirror of
https://github.com/mynodebtc/mynode.git
synced 2024-11-15 18:02:49 +00:00
35 lines
1.0 KiB
Bash
Executable File
35 lines
1.0 KiB
Bash
Executable File
#!/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
|
|
if grep -qs '/mnt/hdd' /proc/mounts; then
|
|
docker ps >> /tmp/mynode_info/device_info
|
|
else
|
|
echo "Drive not mounted - skipping 'docker ps'" >> /tmp/mynode_info/device_info
|
|
fi
|
|
echo "" >> /tmp/mynode_info/device_info
|
|
|
|
# Create tarball
|
|
tar -czvf /tmp/mynode_logs.tar.gz /var/log/ /tmp/mynode_info/ |