Esempio n. 1
0
 def start(self):
     dirname = os.path.realpath(os.path.dirname(__file__))
     cmd = "python2 " + dirname + "/sudo_worker.py " + config.file_path()
     self.proc = subprocess.Popen(get_sudo(cmd),
                                  shell=True,
                                  stdin=subprocess.PIPE,
                                  stdout=subprocess.PIPE)
Esempio n. 2
0
File: gtk.py Progetto: palob/bups
	def get_scheduler_config(self):
		if not self.schedule_switch.get_active():
			return None

		dirname = os.path.realpath(os.path.dirname(__file__))
		logfile = dirname+"/scheduler-log.log"
		cmd = "python2 "+dirname+"/scheduler_worker.py "+config.file_path()
		cmd += " > "+logfile+" 2>&1"

		cfg = {
			"period": self.schedule_period_spin.get_value_as_int(),
			"delay": 15,
			"id": "bups",
			"command": cmd
		}

		return cfg
Esempio n. 3
0
    def get_scheduler_config(self):
        if not self.schedule_switch.get_active():
            return None

        dirname = os.path.realpath(os.path.dirname(__file__))
        logfile = dirname + "/scheduler-log.log"
        cmd = sys.executable + " " + dirname + "/scheduler_worker.py " + config.file_path(
        )
        cmd += " > " + logfile + " 2>&1"

        cfg = {
            "period": self.schedule_period_spin.get_value_as_int(),
            "delay": 15,
            "id": "bups",
            "command": cmd
        }

        return cfg
Esempio n. 4
0
	def start(self):
		dirname = os.path.realpath(os.path.dirname(__file__))
		cmd = "python2 "+dirname+"/sudo_worker.py "+config.file_path()
		self.proc = subprocess.Popen(get_sudo(cmd), shell=True, stdin=subprocess.PIPE, stdout=subprocess.PIPE)