mirror of
https://aur.archlinux.org/rustdesk-bin.git
synced 2025-10-02 04:42:04 +08:00
29 lines
1.1 KiB
Text
29 lines
1.1 KiB
Text
# 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
|
|
|
|
# Marks the service for restart (the actual restart will be handled by the pacman hook "30-systemd-restart-marked.hook")
|
|
systemctl -q is-active rustdesk.service && systemctl set-property rustdesk.service Markers=needs-restart || true
|
|
}
|
|
|
|
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
|
|
}
|
|
|