Add arch: - PKGBUILD + yams.install in packaging/arch/ - build-arch-pkg.sh (pacman deps, makepkg, repo-add) - arch-lane.Dockerfile systemd validation substrate - arch-package.Dockerfile pre-baked CI builder - package-lane.sh --only arch (build + validate local lane) - package-validate.sh Arch lane (pacman -U/-R smoke-test) - release.yml: 2 new matrix entries, arch-repo metadata, R2 upload - publish-repos.yml: arch-repo download + R2 upload - yams-repo worker: /archrepo route, .pkg.tar.zst + .db/.files types
38 lines
1.1 KiB
Text
38 lines
1.1 KiB
Text
# Arch Linux install script for YAMS
|
|
# Handles systemd daemon registration, enable, start, stop, and teardown.
|
|
|
|
UNIT=yams-daemon.service
|
|
|
|
post_install() {
|
|
if [ -d /run/systemd/system ]; then
|
|
systemctl --system daemon-reload >/dev/null 2>&1 || true
|
|
# Enable per systemd preset (80-yams.preset ships with the package)
|
|
systemctl preset "${UNIT}" >/dev/null 2>&1 || true
|
|
# Start now (first install — pacman -U)
|
|
systemctl start "${UNIT}" >/dev/null 2>&1 || true
|
|
fi
|
|
}
|
|
|
|
post_upgrade() {
|
|
if [ -d /run/systemd/system ]; then
|
|
systemctl --system daemon-reload >/dev/null 2>&1 || true
|
|
# Restart if it was running, otherwise just re-enable
|
|
if systemctl is-active --quiet "${UNIT}" 2>/dev/null; then
|
|
systemctl restart "${UNIT}" >/dev/null 2>&1 || true
|
|
else
|
|
systemctl preset "${UNIT}" >/dev/null 2>&1 || true
|
|
fi
|
|
fi
|
|
}
|
|
|
|
pre_remove() {
|
|
if [ -d /run/systemd/system ]; then
|
|
systemctl stop "${UNIT}" >/dev/null 2>&1 || true
|
|
fi
|
|
}
|
|
|
|
post_remove() {
|
|
if [ -d /run/systemd/system ]; then
|
|
systemctl --system daemon-reload >/dev/null 2>&1 || true
|
|
fi
|
|
}
|