~armaan/bin

c3e827b2a10390a940e4c1ef61ddde7492f95951 — Armaan Bhojwani 9 days ago a607ac3
brownoutd: exit cleanly
1 files changed, 7 insertions(+), 3 deletions(-)

M brownoutd
M brownoutd => brownoutd +7 -3
@@ 1,12 1,16 @@
#!/usr/bin/sh
#!/usr/bin/sh -e

trap "exit" INT TERM EXIT

while true; do
	if is-day 42.4 -71.3 ; then
	if is-day "${1:-42.4}" "${2:--71.3}"; then
		brownout 0
	else
		brownout 650
	fi
	
	sleep 900
	sleep 900 &
	wait $!
done