move pkill tray to execstop of the service for linux

This commit is contained in:
rustdesk 2024-04-01 17:07:10 +08:00
parent 26a7f9dd46
commit 57510980ed
7 changed files with 1 additions and 7 deletions

View File

@ -2,8 +2,6 @@
set -e
pkill -f "rustdesk --tray" || true
case $1 in
purge)
rm -rf /root/.config/rustdesk || true

View File

@ -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
}

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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