forked from rustdesk/rustdesk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pacman_install
45 lines (40 loc) · 1.16 KB
/
pacman_install
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# 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/
sudo -H pip3 install pynput
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/
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
update-desktop-database
}