From d3376ddb3c5ec320e387df63d3d89191c1e54de6 Mon Sep 17 00:00:00 2001 From: Josh Sokol Date: Tue, 29 Sep 2026 21:04:33 -0500 Subject: [PATCH] feat: install ping on all supported distros for asset discovery SimpleRisk's asset discovery relies on ping, which minimal server and cloud images often omit. Install iputils-ping (Debian/Ubuntu) or iputils (RHEL family, SUSE) and add an install-verification check. Co-Authored-By: Claude Sonnet 5.5 --- simplerisk-setup.sh | 12 ++++++++++++ tests/verify-install.sh | 4 ++++ 2 files changed, 16 insertions(+) diff --git a/simplerisk-setup.sh b/simplerisk-setup.sh index 1284709..e88c28b 100755 --- a/simplerisk-setup.sh +++ b/simplerisk-setup.sh @@ -631,6 +631,10 @@ setup_ubuntu_debian(){ run_cmd a2enmod ssl run_cmd a2ensite default-ssl + print_status 'Installing ping...' + # ping is used by SimpleRisk's asset discovery and is absent from minimal images. + run_cmd apt-get install -y iputils-ping + print_status 'Installing sendmail...' run_cmd apt-get install -y sendmail @@ -761,6 +765,10 @@ setup_centos_rhel(){ print_status 'Installing mod_ssl' run_cmd dnf -y install mod_ssl + print_status 'Installing ping' + # ping is used by SimpleRisk's asset discovery and is absent from minimal images. + run_cmd dnf -y install iputils + print_status 'Installing sendmail' run_cmd dnf -y install sendmail sendmail-cf m4 @@ -879,6 +887,10 @@ setup_suse(){ print_status 'Installing Apache...' run_cmd zypper -n install apache2 + print_status 'Installing ping...' + # ping is used by SimpleRisk's asset discovery and is absent from minimal images. + run_cmd zypper -n install iputils + print_status 'Enabling Apache on reboot...' run_cmd systemctl enable apache2 diff --git a/tests/verify-install.sh b/tests/verify-install.sh index 6c23ccb..d755897 100755 --- a/tests/verify-install.sh +++ b/tests/verify-install.sh @@ -115,6 +115,10 @@ for ext in mysqli mbstring xml curl gd zip intl ldap; do check "PHP extension '$ext' is loaded" bash -c "php -m | grep -qi '$ext'" done +# ── Network tools ──────────────────────────────────────────────────────────── +echo "--- Network tools ---" +check "ping is installed (asset discovery)" bash -c "command -v ping" + # ── Web server (OS-conditional) ─────────────────────────────────────────────── echo "--- Web server ---" if grep -qi suse /etc/os-release 2>/dev/null; then