blob: 3bb12eb08ea0251224db5a01ea8d9667f36560cd (
plain)
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
|
pre_install() {
end=$((SECONDS + 10))
while :; do
if [ -z "$(ps -eo args | grep WindscribeEngine | grep -v grep)" ]; then
break
fi
if [ $SECONDS -gt $end ]; then
echo 'Error during Windscribe installation. WindscribeEngine is running. Please re-launch Windscribe. And try to update again.'
exit 1
fi
done
echo "Finish pre-install script"
}
post_install() {
ln -s /opt/windscribe/windscribe-cli /usr/bin/windscribe-cli
update-desktop-database
setcap cap_setgid+ep /opt/windscribe/Windscribe
echo linux_zst_x64 >../etc/windscribe/platform
groupadd -r windscribe || true
useradd -r -g windscribe -s /usr/bin/nologin -d / -M windscribe || true
}
pre_upgrade() {
set -e
}
post_upgrade() {
post_install
}
pre_remove() {
killall -q Windscribe || true
/opt/windscribe/helper --reset-mac-addresses
userdel -f windscribe || true
groupdel -f windscribe || true
rm -rf /etc/windscribe
rm -rf /var/log/windscribe
rm -f /usr/bin/windscribe-cli
}
|