mirror of
https://github.com/SinTan1729/random.git
synced 2024-12-26 13:18:35 -06:00
bug fixing
This commit is contained in:
parent
a8258d2f89
commit
e909ec779a
1 changed files with 3 additions and 3 deletions
|
@ -30,6 +30,9 @@ else
|
|||
exit
|
||||
fi
|
||||
|
||||
# sometimes we need to wait a minute so that the next schedule is set up properly (or sunwait reports day/night in a misleading way)
|
||||
[ "$2" == "wait" ] && echo "Waiting 60 seconds..." && sleep 60
|
||||
|
||||
# get sun status
|
||||
sun_status=$(sunwait poll $latitude $longitude)
|
||||
[ $sun_status == "DAY" ] && target=$high || target=$low
|
||||
|
@ -54,9 +57,6 @@ if [ "$1" == "scheduler" ]; then
|
|||
[ "$(at -c $item | sed 'x;$!d')" == "$scriptdir/brightness-by-daylight.sh scheduler wait" ] && flag=false
|
||||
done
|
||||
|
||||
# sometimes we need to wait a minute so that the next schedule is set up properly (or sunwait reports day/night in a misleading way)
|
||||
[ "$2" == "wait" ] && sleep 60
|
||||
|
||||
# actually create the schedule
|
||||
$flag && at -m $time_next <<< "$scriptdir/brightness-by-daylight.sh scheduler wait"
|
||||
fi
|
Loading…
Reference in a new issue