add information fetch scripts

This commit is contained in:
Daniel Micay 2023-07-08 01:10:26 -04:00
parent bb2b23bec3
commit 2bc3eb4857
3 changed files with 48 additions and 0 deletions

16
fetch-modules Executable file
View File

@ -0,0 +1,16 @@
#!/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

16
fetch-packages Executable file
View File

@ -0,0 +1,16 @@
#!/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

16
fetch-units Executable file
View File

@ -0,0 +1,16 @@
#!/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