fix rpm upgrade

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou 2022-07-04 10:11:40 +08:00
parent 7842d5b670
commit ff4bbbd1ed
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
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
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
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
case "$1" in
0)
# for uninstall
rm /usr/share/applications/rustdesk.desktop || true
update-desktop-database
;;
1)
# for upgrade
;;
esac