14 lines
276 B
Bash
Executable File
14 lines
276 B
Bash
Executable File
#!/usr/bin/env bash
|
|
case "$1" in
|
|
status)
|
|
pgrep -x wlsunset >/dev/null 2>&1 && echo true || echo false
|
|
;;
|
|
*)
|
|
if pgrep -x wlsunset >/dev/null 2>&1; then
|
|
pkill -x wlsunset && echo false
|
|
else
|
|
wlsunset -T 4500 -t 3200 & echo true
|
|
fi
|
|
;;
|
|
esac
|