Browse Source

service change /usr/milis/bin/service

tags/mservice-0.1
sonakinci41 3 months ago
parent
commit
bdde6adee1
2 changed files with 6 additions and 6 deletions
  1. +5
    -5
      mservice.py
  2. +1
    -1
      mservice_data/com.milis.pkexec.mservice.policy

+ 5
- 5
mservice.py View File

@@ -64,9 +64,9 @@ class MService(Gtk.Window):
get = question.run()
if get == Gtk.ResponseType.OK:
if status:
get = subprocess.Popen(["service","stop",select], stdout = subprocess.PIPE)
get = subprocess.Popen(["/usr/milis/bin/service","stop",select], stdout = subprocess.PIPE)
else:
get = subprocess.Popen(["service","start",select], stdout = subprocess.PIPE)
get = subprocess.Popen(["/usr/milis/bin/service","start",select], stdout = subprocess.PIPE)
get.wait()
self.get_services()
self.search_widget.set_text("")
@@ -90,7 +90,7 @@ class MService(Gtk.Window):
return get

def enable_service(self,widget,service):
get = subprocess.Popen(["service","enable",service], stdout = subprocess.PIPE)
get = subprocess.Popen(["/usr/milis/bin/service","enable",service], stdout = subprocess.PIPE)
get.wait()
get = self.subprocess_parse(get)
info = Gtk.MessageDialog(self,0,Gtk.MessageType.INFO, Gtk.ButtonsType.OK,"{} servisi aktif hale getirildi.".format(service))
@@ -100,7 +100,7 @@ class MService(Gtk.Window):
info.destroy()

def disable_service(self,widget,service):
get = subprocess.Popen(["service","disable",service], stdout = subprocess.PIPE)
get = subprocess.Popen(["/usr/milis/bin/service","disable",service], stdout = subprocess.PIPE)
get.wait()
get = self.subprocess_parse(get)
info = Gtk.MessageDialog(self,0,Gtk.MessageType.INFO, Gtk.ButtonsType.OK,"{} servisi pasif hale getirildi.".format(service))
@@ -125,7 +125,7 @@ class MService(Gtk.Window):
self.destroy()

def get_service_status(self,service):
get = subprocess.Popen(["service","status",service], stdout = subprocess.PIPE)
get = subprocess.Popen(["/usr/milis/bin/service","status",service], stdout = subprocess.PIPE)
get.wait()
get = self.subprocess_parse(get)
get = get.split("\n")[0]


+ 1
- 1
mservice_data/com.milis.pkexec.mservice.policy View File

@@ -4,7 +4,7 @@
"http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
<policyconfig>

<action id="com.milis.pkexec.msercice">
<action id="com.milis.pkexec.mservice">
<message>Run mservice as root</message>
<message xml:lang="tr">MService yönetici olarak çalıştır</message>
<icon_name>mservice</icon_name>


Loading…
Cancel
Save