From 57510980ede4ffcbb172686f6129902e395f821d Mon Sep 17 00:00:00 2001 From: rustdesk Date: Mon, 1 Apr 2024 17:07:10 +0800 Subject: [PATCH] move pkill tray to execstop of the service for linux --- res/DEBIAN/postrm | 2 -- res/pacman_install | 1 - res/rpm-flutter-suse.spec | 1 - res/rpm-flutter.spec | 1 - res/rpm-suse.spec | 1 - res/rpm.spec | 1 - res/rustdesk.service | 1 + 7 files changed, 1 insertion(+), 7 deletions(-) diff --git a/res/DEBIAN/postrm b/res/DEBIAN/postrm index b689ef13b..003a1529a 100755 --- a/res/DEBIAN/postrm +++ b/res/DEBIAN/postrm @@ -2,8 +2,6 @@ set -e -pkill -f "rustdesk --tray" || true - case $1 in purge) rm -rf /root/.config/rustdesk || true diff --git a/res/pacman_install b/res/pacman_install index dd9c504f6..bcd69077d 100644 --- a/res/pacman_install +++ b/res/pacman_install @@ -43,6 +43,5 @@ pre_remove() { post_remove() { rm /usr/share/applications/rustdesk.desktop || true rm /usr/share/applications/rustdesk-link.desktop || true - pkill -f "rustdesk --tray" || true update-desktop-database } diff --git a/res/rpm-flutter-suse.spec b/res/rpm-flutter-suse.spec index 8d722d796..976c24014 100644 --- a/res/rpm-flutter-suse.spec +++ b/res/rpm-flutter-suse.spec @@ -81,7 +81,6 @@ case "$1" in rm /usr/share/applications/rustdesk.desktop || true rm /usr/share/applications/rustdesk-link.desktop || true rm /usr/bin/rustdesk || true - pkill -f "rustdesk --tray" || true update-desktop-database ;; 1) diff --git a/res/rpm-flutter.spec b/res/rpm-flutter.spec index c8e90829c..a841561ef 100644 --- a/res/rpm-flutter.spec +++ b/res/rpm-flutter.spec @@ -81,7 +81,6 @@ case "$1" in rm /usr/share/applications/rustdesk.desktop || true rm /usr/share/applications/rustdesk-link.desktop || true rm /usr/bin/rustdesk || true - pkill -f "rustdesk --tray" || true update-desktop-database ;; 1) diff --git a/res/rpm-suse.spec b/res/rpm-suse.spec index fdfeb5d5b..d84e14812 100644 --- a/res/rpm-suse.spec +++ b/res/rpm-suse.spec @@ -83,7 +83,6 @@ case "$1" in # for uninstall rm /usr/share/applications/rustdesk.desktop || true rm /usr/share/applications/rustdesk-link.desktop || true - pkill -f "rustdesk --tray" || true update-desktop-database ;; 1) diff --git a/res/rpm.spec b/res/rpm.spec index ea0f0c660..8f6d15557 100644 --- a/res/rpm.spec +++ b/res/rpm.spec @@ -84,7 +84,6 @@ case "$1" in # for uninstall rm /usr/share/applications/rustdesk.desktop || true rm /usr/share/applications/rustdesk-link.desktop || true - pkill -f "rustdesk --tray" || true update-desktop-database ;; 1) diff --git a/res/rustdesk.service b/res/rustdesk.service index e703b056f..76069954c 100644 --- a/res/rustdesk.service +++ b/res/rustdesk.service @@ -6,6 +6,7 @@ After=systemd-user-sessions.service [Service] Type=simple ExecStart=/usr/bin/rustdesk --service +ExecStop=pkill -f "rustdesk --tray" PIDFile=/run/rustdesk.pid KillMode=mixed TimeoutStopSec=30