2022-05-23 11:59:56 +08:00
|
|
|
# arg 1: the new package version
|
|
|
|
#pre_install() {
|
|
|
|
#}
|
|
|
|
|
|
|
|
# arg 1: the new package version
|
|
|
|
post_install() {
|
|
|
|
# do something here
|
|
|
|
cp /usr/share/rustdesk/files/rustdesk.service /etc/systemd/system/rustdesk.service
|
|
|
|
cp /usr/share/rustdesk/files/rustdesk.desktop /usr/share/applications/
|
2022-10-11 19:52:03 +08:00
|
|
|
cp /usr/share/rustdesk/files/rustdesk-link.desktop /usr/share/applications/
|
2022-05-23 11:59:56 +08:00
|
|
|
systemctl daemon-reload
|
|
|
|
systemctl enable rustdesk
|
|
|
|
systemctl start rustdesk
|
|
|
|
update-desktop-database
|
|
|
|
}
|
|
|
|
|
|
|
|
# arg 1: the new package version
|
|
|
|
# arg 2: the old package version
|
|
|
|
pre_upgrade() {
|
|
|
|
systemctl stop rustdesk || true
|
|
|
|
}
|
|
|
|
|
|
|
|
# arg 1: the new package version
|
|
|
|
# arg 2: the old package version
|
|
|
|
post_upgrade() {
|
|
|
|
cp /usr/share/rustdesk/files/rustdesk.service /etc/systemd/system/rustdesk.service
|
|
|
|
cp /usr/share/rustdesk/files/rustdesk.desktop /usr/share/applications/
|
2022-10-11 19:52:03 +08:00
|
|
|
cp /usr/share/rustdesk/files/rustdesk-link.desktop /usr/share/applications/
|
2022-05-23 11:59:56 +08:00
|
|
|
systemctl daemon-reload
|
|
|
|
systemctl enable rustdesk
|
|
|
|
systemctl start rustdesk
|
|
|
|
update-desktop-database
|
|
|
|
}
|
|
|
|
|
|
|
|
# arg 1: the old package version
|
|
|
|
pre_remove() {
|
|
|
|
systemctl stop rustdesk || true
|
|
|
|
systemctl disable rustdesk || true
|
|
|
|
rm /etc/systemd/system/rustdesk.service || true
|
|
|
|
}
|
|
|
|
|
|
|
|
# arg 1: the old package version
|
|
|
|
post_remove() {
|
|
|
|
rm /usr/share/applications/rustdesk.desktop || true
|
2022-10-11 19:52:03 +08:00
|
|
|
rm /usr/share/applications/rustdesk-link.desktop || true
|
2022-05-23 11:59:56 +08:00
|
|
|
update-desktop-database
|
|
|
|
}
|