From a957abd347d1f8dc8b76b5dd9efa6c0df3846149 Mon Sep 17 00:00:00 2001 From: Daniel Micay Date: Mon, 10 Jul 2023 23:35:56 -0400 Subject: [PATCH] unified info fetching script --- fetch-info | 20 ++++++++++++++++++++ fetch-modules | 16 ---------------- fetch-packages | 16 ---------------- fetch-units | 16 ---------------- 4 files changed, 20 insertions(+), 48 deletions(-) create mode 100755 fetch-info delete mode 100755 fetch-modules delete mode 100755 fetch-packages delete mode 100755 fetch-units diff --git a/fetch-info b/fetch-info new file mode 100755 index 0000000..956c78e --- /dev/null +++ b/fetch-info @@ -0,0 +1,20 @@ +#!/bin/bash + +set -o errexit + +user=root + +. hosts.sh + +rm -rf modules packages units +mkdir -p modules packages units + +for host in ${hosts_all[@]}; do + ( + ssh root@$host lsmod | sort > modules/$host + ssh root@$host pacman -Qqe > packages/$host + ssh root@$host systemctl list-unit-files --state=enabled --state=disabled --state=masked | sort > units/$host + ) & +done + +wait diff --git a/fetch-modules b/fetch-modules deleted file mode 100755 index 78d5ed9..0000000 --- a/fetch-modules +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -set -o errexit - -user=root - -. hosts.sh - -rm -rf modules -mkdir -p modules - -for host in ${hosts_all[@]}; do - echo $host - ssh root@$host lsmod | sort > modules/$host - echo -done diff --git a/fetch-packages b/fetch-packages deleted file mode 100755 index 8c1f895..0000000 --- a/fetch-packages +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -set -o errexit - -user=root - -. hosts.sh - -rm -rf packages -mkdir -p packages - -for host in ${hosts_all[@]}; do - echo $host - ssh root@$host pacman -Qqe > packages/$host - echo -done diff --git a/fetch-units b/fetch-units deleted file mode 100755 index 1608907..0000000 --- a/fetch-units +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -set -o errexit - -user=root - -. hosts.sh - -rm -rf units -mkdir -p units - -for host in ${hosts_all[@]}; do - echo $host - ssh root@$host systemctl list-unit-files --state=enabled --state=disabled --state=masked | sort > units/$host - echo -done