-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcollect.sh
executable file
·51 lines (39 loc) · 1.13 KB
/
collect.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/usr/bin/bash
set -euo pipefail
rm -vrf ~/install.bundle ~/install.tgz
mkdir -vp ~/install.bundle
sudo cp /etc/apt/sources.list ~/install.bundle
cd /
sudo tar czvf ~/install.bundle/firmware.tgz \
lib/firmware/amd/amd_sev_fam17h_model01h.sbin \
sudo tar czvf ~/install.bundle/configuration.tgz \
etc/default/grub \
etc/default/networking \
etc/dracut.conf.d/20-sev-firmware.conf \
etc/network/interfaces \
etc/ssh/sshd_config.d/10-no-passwords.conf \
etc/sysctl.d/10-disable-ipv6.conf \
opt/nomad/docker.json \
lib/systemd/system/monitor-systemd-journal.service
sudo tar czvf ~/install.bundle/mok.tgz \
var/lib/shim-signed/mok
cd ~
tar czvf ~/install.bundle/$USER.tgz \
.docker/config.json \
.ssh \
.zshrc \
.zshenv \
.p10k.zsh \
bin
cp -v ~{,/install.bundle}/secrets.tgz
cp -v ~{,/install.bundle}/kernel.tgz
cp -v ~/install{,.bundle}/ldap.tgz
cp -vR ~/install{,.bundle}/patch
cp -vR ~/install{,.bundle}/scripts
mv -v ~/install{,.old}
mv -v ~/install{.bundle,}
sudo chown -R $USER:$USER install/*
sudo tar czvf ~/install.tgz install
rm -v -rf ~/install
mv -v ~/install{.old,}
sudo chown $USER:$USER ~/install.tgz