Add Ability to Use Custom Service (#418)
* Custom Servive * Custom Service * Update system.py * Update Configuration.md
This commit is contained in:
parent
8c489bc465
commit
f796a72057
@ -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,6 +1,7 @@
|
||||
[main]
|
||||
moonraker_host: 127.0.0.1
|
||||
moonraker_port: 7125
|
||||
service: KlipperScreen
|
||||
|
||||
[preheat PLA]
|
||||
bed = 40
|
||||
|
@ -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'))
|
||||
|
@ -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):
|
||||
|
Loading…
x
Reference in New Issue
Block a user