summarylogtreecommitdiffstats
path: root/rustdesk-bin.install
blob: bcb2a4b58629cd3fc9378629f1624852976f7b1e (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
# Colored makepkg-like functions
_all_off="$(tput sgr0)"
_bold="${_all_off}$(tput bold)"
_blue="${_bold}$(tput setaf 4)"
_yellow="${_bold}$(tput setaf 3)"
note() {
	printf "${_blue}==>${_yellow} NOTE:${_bold} %s${_all_off}\n" "$1"
}

post_install() {
	note "The RustDesk daemon must be started for RustDesk to work."
	note "To start it automatically on boot, run 'sudo systemctl enable --now rustdesk' in a terminal."
}

post_upgrade() {
	# Display instructions to enable the RustDesk service if it's not enabled
	systemctl -q is-enabled rustdesk.service || post_install
}

pre_remove() {
	if systemctl -q is-active rustdesk.service; then
		note "The RustDesk service may still be running after removing the package, allowing remote access to this system."
		note "To ensure that RustDesk isn't running anymore on your system, run 'sudo systemctl stop rustdesk' in a terminal."
	fi
}