Script to gather information for a troubleshooting post

Hi,

I made a small script to gather the information needed to open a troubleshooting post
which puts everything together for fast copy and paste:

#!/bin/bash

# Get DietPi version
dietpi_version=$(cat /boot/dietpi/.version)

# Get Distro version
distro_version=$(echo $G_DISTRO_NAME $G_RASPBIAN)

# Get Kernel version
kernel_version=$(uname -a)

# Get Architecture
architecture=$(dpkg --print-architecture)

# Get SBC model
sbc_model=$(echo $G_HW_MODEL_NAME)

# Template with placeholders
template=
"DietPi version | $dietpi_version
Distro version | $distro_version
Kernel version | $kernel_version
Architecture | $architecture
SBC model | $sbc_model"

echo "$template"

Regards
Hyper

1 Like