Initial commit

This commit is contained in:
dataprolet 2024-04-17 12:07:03 +00:00
parent 75934861b4
commit cbcfa80da8
1 changed files with 13 additions and 0 deletions

13
Scripts/check_bat.sh Normal file
View File

@ -0,0 +1,13 @@
#!/bin/bash
# Check if system is charging or not.
# Continue only if charging.
on_power=$(cat /sys/class/power_supply/AC/online)
if [[ $on_power == 0 ]]; then
echo "Device is not connected to power. Exiting.."
exit 0
else
echo "Device is connected to power. Continuing.."
fi