-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathLauncher-grid-buyer
executable file
·31 lines (17 loc) · 984 Bytes
/
Launcher-grid-buyer
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/bash
#turn off monitor screen saver. can't figure out the correct config file to edit, but it works when place here, so it is fine
xset s off # don't activate screensaver
xset -dpms # disable DPMS (Energy Star) features.
xset s noblank # don't blank the video device
cd $HOME/Desktop/DistributedCharge
while true
do
# stdbuf no longer seems to work right (might have on an older ubuntu version???)
# instead need to use the -u option with python3 (and actually may no longer
# need stdbuf at all with the -u option ???).
# need to use the -u option to get outputs to be written in a timely manner.
stdbuf -oL -eL python3 -u ./grid-buyer.py>>$HOME/.dc/output-grid-buyer.txt 2>&1
#wait a second before relaunching
#note, if the script was killed or died without allowing for the digital outputs to be transitioned to a low state, it will take 10 seconds to restart the script, which resets them at the start of the script.
sleep 10
done