Ship an install.sh in the source zip (and as a curl-able standalone) that automates the manual post-install steps currently documented in INSTALL.md > "Source Tarball". Targets air-gapped hosts and environments that cannot or do not want to reach the Linuxfabrik package repository.
Target one-liner:
curl -fsSL https://download.linuxfabrik.ch/monitoring-plugins/install.sh | sudo bash
Alternative: run ./install.sh from the unpacked source zip.
Script responsibilities:
- Read
/etc/os-release to pick the plugin user (icinga on RHEL and SLE, nagios on Debian and Ubuntu) and the matching sudoers drop-in from assets/sudoers/.
- Download and unzip
lfmp-<version>-<iteration>.source.noarch.zip into /usr/lib64/nagios/plugins/. Version selectable via flag or LFMP_VERSION env.
- Install Python dependencies as the plugin user. Preferred: build a venv at
/usr/lib64/linuxfabrik-monitoring-plugins/venv/ and rewrite plugin shebangs, so the source install matches the RPM and DEB layout. Fallback: pip install --user --require-hashes --requirement requirements.txt.
- Install the OS-family-appropriate sudoers file to
/etc/sudoers.d/linuxfabrik-monitoring-plugins.
- On RHEL with enforcing SELinux, run
restorecon -Fvr /usr/lib64/nagios and setsebool -P nagios_run_sudo on.
- Support
--uninstall to reverse everything cleanly. Idempotent on re-runs.
Delivery:
- Script source under
tools/install-source in this repo, included in the source zip by build/create-src-tarball.sh.
- Deployed standalone to
https://download.linuxfabrik.ch/monitoring-plugins/install.sh with sha256 checksum and detached GPG signature.
- Script starts with
set -eu -o pipefail, honors DRY_RUN=1, exits non-zero on unsupported distributions.
Relationship to #1089:
- OS detection and sudoers placement are identical; factor into a shared snippet or helper to keep both scripts aligned.
Docs (INSTALL.md):
- Replace the manual chmod / pip / sudoers / SELinux steps in "Source Tarball" with the one-liner form plus a "download first, review, then run" variant.
Ship an
install.shin the source zip (and as a curl-able standalone) that automates the manual post-install steps currently documented inINSTALL.md> "Source Tarball". Targets air-gapped hosts and environments that cannot or do not want to reach the Linuxfabrik package repository.Target one-liner:
curl -fsSL https://download.linuxfabrik.ch/monitoring-plugins/install.sh | sudo bashAlternative: run
./install.shfrom the unpacked source zip.Script responsibilities:
/etc/os-releaseto pick the plugin user (icingaon RHEL and SLE,nagioson Debian and Ubuntu) and the matching sudoers drop-in fromassets/sudoers/.lfmp-<version>-<iteration>.source.noarch.zipinto/usr/lib64/nagios/plugins/. Version selectable via flag orLFMP_VERSIONenv./usr/lib64/linuxfabrik-monitoring-plugins/venv/and rewrite plugin shebangs, so the source install matches the RPM and DEB layout. Fallback:pip install --user --require-hashes --requirement requirements.txt./etc/sudoers.d/linuxfabrik-monitoring-plugins.restorecon -Fvr /usr/lib64/nagiosandsetsebool -P nagios_run_sudo on.--uninstallto reverse everything cleanly. Idempotent on re-runs.Delivery:
tools/install-sourcein this repo, included in the source zip bybuild/create-src-tarball.sh.https://download.linuxfabrik.ch/monitoring-plugins/install.shwith sha256 checksum and detached GPG signature.set -eu -o pipefail, honorsDRY_RUN=1, exits non-zero on unsupported distributions.Relationship to #1089:
Docs (
INSTALL.md):