Standby.py -> shell script ausführen

    • Standby.py -> shell script ausführen

      Hallo ich hab ein script in /usr/bin/curl_on.sh erstellt

      jetzt möchte ich das dieses script ausgeführt wird wenn ich in Standby gehe und verlasse

      mein geändertes Script, funktioniert leider nocht, die DM800HD startet auch nicht mehr mit dieser änderung

      Standby.py

      from Screen import Screen
      from Components.ActionMap import ActionMap
      from Components.config import config
      from Components.AVSwitch import AVSwitch
      from Components.SystemInfo import SystemInfo
      from GlobalActions import globalActionMap
      from enigma import eDVBVolumecontrol


      inStandby = None

      class Standby(Screen):
      def Power(self):
      print "leave standby"
      #set input to encoder

      import os
      if os.path.exists("/usr/bin/curl_on.sh"):
      os.system("/usr/bin/curl_on.sh")

      self.leaveMute()

      self.avswitch.setInput("ENCODER")
      #restart last played service
      #unmute adc
      #
      #kill me
      self.close(True)

      def setMute(self):
      if (eDVBVolumecontrol.getInstance().isMuted()):
      self.wasMuted = 1
      print "mute already active"
      else:
      self.wasMuted = 0
      eDVBVolumecontrol.getInstance().volumeToggleMute()

      def leaveMute(self):
      if self.wasMuted == 0:
      eDVBVolumecontrol.getInstance().volumeToggleMute()


      Dankie

      def __init__(self, session):
      Screen.__init__(self, session)
      self.avswitch = AVSwitch()

      print "enter standby"

      import os
      if os.path.exists("/usr/bin/curl_off.sh"):
      os.system("/usr/bin/curl_off.sh")

      self["actions"] = ActionMap( [ "StandbyActions" ],
      {
      "power": self.Power
      }, -1)
    • gues/my version:
      commands in your script doesnt work properly when script is call from Python

      i got same problem when came OE1.6 - simple commands as grep, cat etc doesnt work
      Change AudioTrack by Language Priority
      dm7080sstt; 2x dm8000sstt; dm7020s <- Diseq1x4 <- 3x Diseq1x10 <-
      Dishes:
      1.8m 36E;28E;23E;19E;16E;13E;7E
      1.6m 42E;36E
      1.0m 10/9E;5E;1W;8W
      1.0m 15W;22W;30W
      1.1m 4/5W;12W;18W;24W
      1.1m 53E;60E
      1.0m 75E
      TVs: Philips 46pfl9707s; Philips 42pfl9703h