You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
725 B
39 lines
725 B
#!/usr/bin/env bash |
|
|
|
if ! sudo which nft |
|
then |
|
echo "install nftables" |
|
exit 1 |
|
fi |
|
|
|
if ! sudo nft list ruleset |grep output |
|
then |
|
sudo nft -f log.nft |
|
fi |
|
|
|
if ! sudo nft list ruleset |grep output |
|
then |
|
echo "nft error" |
|
exit 1 |
|
fi |
|
|
|
if ! id | grep systemd-journal |
|
then |
|
echo "sudo adduser $(whoami) systemd-journal" |
|
sudo adduser "$(whoami)" systemd-journal |
|
exit 1 |
|
fi |
|
|
|
packages="python3-systemd python3-tabulate python3-dns dnscap python3-pure-pcapy3 tshark" |
|
|
|
apt -s install "${packages}" |
|
echo "apt-get -s ${packages}" |
|
if apt-get -s install "${packages}" |grep ^Inst |
|
then |
|
echo "install python packages" |
|
exit 1 |
|
fi |
|
|
|
echo "####################" |
|
echo "### System Ready " |
|
echo "####################" |