From 52367b6816dc4c8348dfdae841c5586f0b4c8bac Mon Sep 17 00:00:00 2001
From: Konstantin Kukharenko <konstantin.kuharenko@demlabs.net>
Date: Thu, 7 Nov 2024 13:11:58 +0300
Subject: [PATCH] [*]

---
 os/debian/share/CellFrameDashboard.desktop        |  1 +
 os/linux/share/CellFrameDashboard.desktop         |  3 ++-
 os/linux/share/init.d/cellframe-dashboard.service | 15 +++++++++++++++
 3 files changed, 18 insertions(+), 1 deletion(-)
 create mode 100644 os/linux/share/init.d/cellframe-dashboard.service

diff --git a/os/debian/share/CellFrameDashboard.desktop b/os/debian/share/CellFrameDashboard.desktop
index 2e7519b1b..3ff3dcc91 100644
--- a/os/debian/share/CellFrameDashboard.desktop
+++ b/os/debian/share/CellFrameDashboard.desktop
@@ -4,6 +4,7 @@ Exec=/opt/cellframe-dashboard/bin/Cellframe-Dashboard
 Icon=/opt/cellframe-dashboard/share/CellframeDashboard.png
 Terminal=false
 Type=Application
+StartupWMClass=Cellframe-Dashboard
 Encoding=UTF-8
 Categories=Network;Application;
 Name[en_US]=CellFrame Dashboard
diff --git a/os/linux/share/CellFrameDashboard.desktop b/os/linux/share/CellFrameDashboard.desktop
index 2e7519b1b..3d15d6e5f 100644
--- a/os/linux/share/CellFrameDashboard.desktop
+++ b/os/linux/share/CellFrameDashboard.desktop
@@ -4,6 +4,7 @@ Exec=/opt/cellframe-dashboard/bin/Cellframe-Dashboard
 Icon=/opt/cellframe-dashboard/share/CellframeDashboard.png
 Terminal=false
 Type=Application
+StartupWMClass=Cellframe-Dashboard
 Encoding=UTF-8
 Categories=Network;Application;
-Name[en_US]=CellFrame Dashboard
+Name[en_US]=CellFrame Dashboard
\ No newline at end of file
diff --git a/os/linux/share/init.d/cellframe-dashboard.service b/os/linux/share/init.d/cellframe-dashboard.service
new file mode 100644
index 000000000..c5d1b2765
--- /dev/null
+++ b/os/linux/share/init.d/cellframe-dashboard.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=Cellframe Dashboard Service
+After=network.target
+
+[Service]
+Type=forking
+OOMScoreAdjust=-1000
+#PIDFile=/opt/cellframe-dashboard/Cellframe-DashboardService.pid
+WorkingDirectory=/opt/cellframe-dashboard/
+ExecStart=/opt/cellframe-dashboard/bin/Cellframe-DashboardService -D
+ExecStop=/opt/cellframe-dashboard/bin/Cellframe-DashboardService --stop
+Restart=always
+
+[Install] 
+WantedBy=multi-user.target
-- 
GitLab