Rev 4688 Rev 4690
Line 12... Line 12...
12   12  
13 while True: 13 while True:
14 stav = gpio.digitalRead(88) 14 stav = gpio.digitalRead(88)
15   15  
16 if oldstav == 0 and stav == 0: 16 if oldstav == 0 and stav == 0:
17 subprocess.call("shutdown -P 1", shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) 17 subprocess.call("shutdown -P 0", shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
18 else: 18 else:
19 print "power is OK." 19 print "power is OK."
20 20
21 oldstav = stav 21 oldstav = stav
22   22