Add Ability to Use Custom Service (#418)

* Custom Servive

* Custom Service

* Update system.py

* Update Configuration.md
This commit is contained in:
Devil-of-Chaos authored and GitHub committed 2022-01-13 11:17:45 -05:00
1 parent 8c489bc465
commit f796a72057
4 files changed
+6 -2

No files matched your search

+3
View File
@@ -33,6 +33,9 @@ language: en
# Allows the cursor to be displayed on the screen
show_cursor: False
# Allows to define custom systemctl command for restart like xrdp
service: KlipperScreen
```
## Printer Options
+1
View File
@@ -1,6 +1,7 @@
[main]
moonraker_host: 127.0.0.1
moonraker_port: 7125
service: KlipperScreen
[preheat PLA]
bed = 40
+1 -1
View File
@@ -399,4 +399,4 @@ class SystemPanel(ScreenPanel):
self._screen._ws.klippy.restart()
def restart_ks(self, widget):
os.system("sudo systemctl restart KlipperScreen")
os.system("sudo systemctl restart %s" % self._config.get_main_config_option('service'))
+1 -1
View File
@@ -435,7 +435,7 @@ class KlipperScreen(Gtk.Window):
def restart_ks(self, widget, response_id):
if response_id == Gtk.ResponseType.OK:
logging.debug("Restarting")
os.system("sudo systemctl restart KlipperScreen")
os.system("sudo systemctl restart %s" % self._config.get_main_config_option('service'))
widget.destroy()
def init_style(self):