summaryrefslogtreecommitdiff
path: root/.a/work-mode.sh
blob: 3c9dc730f317d7d430716b3c821fbcfae180ca6a (plain) (blame)
1
2
3
4
5
6
7
8
#!/bin/bash

if [ ! -f /tmp/stopwork ]; then
	touch /tmp/stopwork
else
	$(su - kamen -s /bin/bash -c "while [ -f /tmp/stopwork ]; do if [ $(date '+%H') -gt 9 ] && [ $(date '+%H') -lt 21 ]; then pkill Min; fi; sleep 1; done" &) \
	&& rm /tmp/stopwork
fi