mirror of
https://github.com/archlinux/aur.git
synced 2026-03-14 23:16:48 +01:00
37 lines
1.3 KiB
Text
37 lines
1.3 KiB
Text
post_install() {
|
|
echo "Reloading systemd daemon..."
|
|
systemctl daemon-reload
|
|
udevadm control --reload-rules && udevadm trigger || true
|
|
echo "------------------------------------------------------------------------"
|
|
echo "CrossMacro Daemon installed."
|
|
echo ""
|
|
echo "1. Enable and start the service:"
|
|
echo " sudo systemctl enable --now crossmacro.service"
|
|
echo ""
|
|
echo "2. Add yourself to the 'crossmacro' group to communicate with the daemon:"
|
|
echo " sudo usermod -aG crossmacro \$USER"
|
|
echo ""
|
|
echo "3. Log out and log back in for group changes to take effect."
|
|
echo "------------------------------------------------------------------------"
|
|
}
|
|
|
|
post_upgrade() {
|
|
systemctl daemon-reload
|
|
# Only restart if service is active
|
|
if systemctl is-active --quiet crossmacro.service 2>/dev/null; then
|
|
systemctl try-restart crossmacro.service || true
|
|
fi
|
|
}
|
|
|
|
pre_remove() {
|
|
# Only disable if service exists and is enabled/active
|
|
if systemctl is-enabled --quiet crossmacro.service 2>/dev/null || \
|
|
systemctl is-active --quiet crossmacro.service 2>/dev/null; then
|
|
systemctl disable --now crossmacro.service || true
|
|
fi
|
|
}
|
|
|
|
post_remove() {
|
|
systemctl daemon-reload
|
|
udevadm control --reload-rules && udevadm trigger || true
|
|
}
|