commit 2cb9ace7dbd7f6dc563c41c14f443436fb5d3a8e parent d95a23f0a40db751f7a788b4589d800fcf849335 Author: rbckman <rob@tarina.org> Date: Fri, 13 Nov 2020 11:46:41 +0200 dont turn off wifi while developing Diffstat:
M | install.sh | | | 2 | +- |
M | tarina.py | | | 13 | +++++++++---- |
2 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/install.sh b/install.sh @@ -151,7 +151,7 @@ Conflicts=getty@tty1.service [Service] Type=simple RemainAfterExit=yes -ExecStart=/usr/bin/python3 /home/pi/tarina/tarina.py +ExecStart=/usr/bin/python3 /home/pi/tarina/tarina.py default User=pi Restart=on-failure StandardInput=tty-force diff --git a/tarina.py b/tarina.py @@ -154,10 +154,15 @@ def main(): oldtake = take #TURN OFF WIFI AND TARINA SERVER - serverstate = 'off' - wifistate = 'off' - run_command('sudo iwconfig wlan0 txpower off') - serverstate = tarinaserver(False) + if str(sys.argv[0]) == 'default': + serverstate = 'off' + wifistate = 'off' + run_command('sudo iwconfig wlan0 txpower off') + serverstate = tarinaserver(False) + else: + serverstate = 'off' + wifistate = 'on' + serverstate = tarinaserver(False) foldername = filmfolder + filmname + '/' + 'scene' + str(scene).zfill(3) +'/shot' + str(shot).zfill(3) + '/' filename = 'take' + str(take).zfill(3)