#!/data/data/com.qflistudio.azure/files/usr/bin/sh

if [ $# != 0 ]; then
	echo 'usage: termux-wake-unlock'
	echo 'Release the Termux wake lock to allow the CPU to sleep.'
	exit 1
fi

case "${TERMUX__USER_ID:-}" in ''|*[!0-9]*|0[0-9]*) TERMUX__USER_ID=0;; esac

am startservice \
	--user "$TERMUX__USER_ID" \
	-a "com.termux.service_wake_unlock" \
	"com.termux/com.termux.app.TermuxService" \
	> /dev/null
