Fixes the postinst failure when replacing stock caddy on hosts where
caddy.service was masked. The unit file could be missing after dpkg
removes the old caddy package, causing systemctl enable to fail.
Changes:
- postinst: unmask caddy.service before enable, recreate unit file
from embedded copy if missing after unmasking, stop caddy-api.service
with guard
- preinst (new): stop caddy.service and caddy-api.service with || true
guards before install/upgrade
- Makefile: include preinst in deb build
Handles three scenarios:
1. Fresh install (no prior caddy)
2. Upgrade from stock caddy with masked service
3. Upgrade from previous madcat-caddy
Closes#1