I want  use my orange pi power button to suspend and resume system and have some troubles with check state. So I wrote shell script for this but it wont work: it's only suspending. When I click the button in suspend mode, the resumed and suspends again in a few seconds. I can't find a way to resume it.It seems likely that systemctl is-system-running is returning running in the suspended state. My script is:#!/bin/shVALID_P=`systemctl is-system-running`echo $VALID_Pif [ $VALID_P = running ]; then    systemctl suspendelse    systemctl defaultfi
How do I check if the system is currently suspended?
suspend;sleep;armbian
At the end i did thi script:#!/bin/shfile=/home/pi/loltestif [ -e $file ]thenrm /home/pi/loltestelsetouch /home/pi/loltestsystemctl suspendfiWorks ok in armbian. Have some problems in RetroArch or EmulationStation - they just hangs after resume. Anyway, thanks to all for advices