diff --git a/camera.sh b/camera.sh new file mode 100644 index 0000000..d86c9a6 --- /dev/null +++ b/camera.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +cheese >/dev/null 2>&1 & disown + +read -p "Funktioniert Kamera? Cheese öffnet sich - (y/n): " answer + +if [[ "$answer" == [Yy] ]]; then + return 0 +elif [[ "$answer" == [Nn] ]]; then + return 1 +else + return 1 +fi \ No newline at end of file diff --git a/delete.sh b/delete.sh new file mode 100644 index 0000000..0862c98 --- /dev/null +++ b/delete.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +read -p "Script Löschen? - (y/n): " answer + +if [[ "$answer" == [Yy] ]]; then + return 0 +elif [[ "$answer" == [Nn] ]]; then + return 1 +else + return 1 +fi \ No newline at end of file diff --git a/drives.sh b/drives.sh new file mode 100644 index 0000000..2aa2587 --- /dev/null +++ b/drives.sh @@ -0,0 +1,36 @@ +#!/bin/bash + +echo "💽 Drive Report" +echo "==============================" + +# Get all physical disks (not partitions) +DISKS=$(lsblk -d -n -o NAME) + +for disk in $DISKS; do + DEV="/dev/$disk" + + SIZE=$(lsblk -d -n -o SIZE "$DEV") + MODEL=$(lsblk -d -n -o MODEL "$DEV" | sed 's/ *$//') + TRAN=$(lsblk -d -n -o TRAN "$DEV") + ROTA=$(cat /sys/block/$disk/queue/rotational 2>/dev/null) + + TYPE="Unknown" + + # NVMe drives are typically M.2 (or PCIe SSD) + if [[ "$disk" == nvme* ]]; then + TYPE="M.2 / NVMe SSD" + else + if [[ "$ROTA" == "1" ]]; then + TYPE="HDD (Rotational)" + elif [[ "$ROTA" == "0" ]]; then + TYPE="SSD" + fi + fi + + echo "Device: $DEV" + echo "Model : ${MODEL:-Unknown}" + echo "Size : $SIZE" + echo "Bus : ${TRAN:-Unknown}" + echo "Type : $TYPE" + echo "------------------------------" +done diff --git a/lan.sh b/lan.sh new file mode 100644 index 0000000..0614116 --- /dev/null +++ b/lan.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +for iface in /sys/class/net/*; do + iface_name=$(basename "$iface") +#echo "${iface_name:0:2}" + + # Skip loopback + if [[ "$iface_name" == "lo" ]]; then + continue + fi + + if [[ "${iface_name:0:2}" == "wl" ]]; then + continue + fi + + # Check if carrier file exists (only for physical interfaces) + if [[ -f "$iface/carrier" ]]; then + carrier=$(cat "$iface/carrier") + + if [[ "$carrier" == "1" ]]; then + echo "Bitte LAN Kabel entfernen" + read -n 1 -s -r -p "Any key to continue" + return 0 + fi + fi +done + +echo "LAN cable is NOT connected" +return 1 \ No newline at end of file diff --git a/logo_CSR.png b/logo_CSR.png new file mode 100644 index 0000000..9c3f698 Binary files /dev/null and b/logo_CSR.png differ