Exemple #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)
Exemple #2
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 = "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
Exemple #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
Exemple #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)