Merge pull request #911 from fufesou/master

fix rpm upgrade
This commit is contained in:
RustDesk 2022-07-04 10:33:44 +08:00 committed by GitHub
commit 82e8ab9020
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 44 additions and 12 deletions

View File

@ -47,7 +47,7 @@ case "$1" in
;;
2)
# for upgrade
service rustdesk stop || true
systemctl stop rustdesk || true
;;
esac
@ -61,10 +61,26 @@ systemctl start rustdesk
update-desktop-database
%preun
systemctl stop rustdesk || true
systemctl disable rustdesk || true
rm /etc/systemd/system/rustdesk.service || true
case "$1" in
0)
# for uninstall
systemctl stop rustdesk || true
systemctl disable rustdesk || true
rm /etc/systemd/system/rustdesk.service || true
;;
1)
# for upgrade
;;
esac
%postun
rm /usr/share/applications/rustdesk.desktop || true
update-desktop-database
case "$1" in
0)
# for uninstall
rm /usr/share/applications/rustdesk.desktop || true
update-desktop-database
;;
1)
# for upgrade
;;
esac

View File

@ -48,7 +48,7 @@ case "$1" in
;;
2)
# for upgrade
service rustdesk stop || true
systemctl stop rustdesk || true
;;
esac
@ -62,10 +62,26 @@ systemctl start rustdesk
update-desktop-database
%preun
systemctl stop rustdesk || true
systemctl disable rustdesk || true
rm /etc/systemd/system/rustdesk.service || true
case "$1" in
0)
# for uninstall
systemctl stop rustdesk || true
systemctl disable rustdesk || true
rm /etc/systemd/system/rustdesk.service || true
;;
1)
# for upgrade
;;
esac
%postun
rm /usr/share/applications/rustdesk.desktop || true
update-desktop-database
case "$1" in
0)
# for uninstall
rm /usr/share/applications/rustdesk.desktop || true
update-desktop-database
;;
1)
# for upgrade
;;
esac