blob: cd644027adae227ad5d946b91ab8ef6beec5ee4b (
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
|
# Colored makepkg-like functions
note() {
printf "${_blue}==>${_yellow} NOTE:${_bold} %s${_all_off}\n" "$1"
}
_all_off="$(tput sgr0)"
_bold="${_all_off}$(tput bold)"
_blue="${_bold}$(tput setaf 4)"
_yellow="${_bold}$(tput setaf 3)"
post_install() {
chmod +x /usr/bin/clash-verge-service-install
chmod +x /usr/bin/clash-verge-service-uninstall
chmod +x /usr/bin/clash-verge-service
}
post_upgrade() {
post_install
# Now let us reload Clash Verge service automatically.
if systemctl is-active --quiet clash-verge-service.service; then
systemctl restart clash-verge-service.service
fi
note "After upgrading Clash Verge Rev, it is recommended to restart Clash Verge Rev."
}
pre_remove() {
# Remove service file silently, as official Debian package does
/usr/bin/clash-verge-service-uninstall
}
|