| The Following 3 Users Say Thank You to shadowjk For This Useful Post: | ||
#!/bin/sh
#swapswap
current_swap=$( cat /proc/swaps | awk '/mmcblk/ {print $1}' | cut -d "k" -f2 ut -c1)
drivelist=$(sfdisk -lnd /dev/mmcblk1)
swapmicro=$(echo "$drivelist" -n | grep Id=82 | awk '/mmcblk1/ {print $1}')
if [ "$current_swap" = "0" ]; then
if [ "$swapmicro" ]; then
swapon $swapmicro
swapoff /dev/mmcblk0p3
fi
#echo "swap is on sd"
elif [ "$current_swap" = "1" ]; then
swapon /dev/mmcblk0p3
swapoff $swapmicro
#echo "swap is on emmc"
fi
#!/bin/sh
#check if device is not in use, if so swapswap!
brightness=$(cat /sys/class/backlight/acx565akm/brightness)
keyboard=$(cat /sys/devices/platform/gpio-switch/slide/state)
if [ "$brightness" == "0" ]; then
if [ "$keyboard" == "closed" ]; then
echo "/opt/scripts/swapswap.sh" | root
echo "/opt/scripts/swapswap.sh" | root
fi
fi
| The Following 7 Users Say Thank You to vi_ For This Useful Post: | ||

| The Following 4 Users Say Thank You to shadowjk For This Useful Post: | ||
| The Following User Says Thank You to Tigerite For This Useful Post: | ||