2022-12-22 17:25:05 +01:00
|
|
|
#!/bin/bash
|
|
|
|
# ISP-A infra
|
|
|
|
set -e
|
2022-12-23 14:32:08 +01:00
|
|
|
if [ -z $SNSTERGUARD ] ; then exit 1; fi
|
2022-12-22 17:25:05 +01:00
|
|
|
DIR=`dirname $0`
|
|
|
|
cd `dirname $0`
|
|
|
|
|
2022-12-23 14:32:08 +01:00
|
|
|
# Email's mail account email@isp-a.sns
|
2022-12-22 17:25:05 +01:00
|
|
|
useradd -m -s "/bin/bash" -p `mkpasswd --method=sha-512 email` email || true
|
|
|
|
addgroup email mail
|
|
|
|
#mkdir /home/hacker/mail
|
|
|
|
#touch /home/hacker/mail/Drafts /home/hacker/mail/Queue /home/hacker/mail/Sent /home/hacker/mail/Trash
|
|
|
|
|
|
|
|
# disable systemd-resolved which conflicts with nsd
|
|
|
|
echo "DNSStubListener=no" >> /etc/systemd/resolved.conf
|
|
|
|
systemctl stop systemd-resolved
|
|
|
|
|
2022-12-23 14:32:08 +01:00
|
|
|
# manage isp-a.sns zone
|
2022-12-22 17:25:05 +01:00
|
|
|
apt-get update
|
|
|
|
DEBIAN_FRONTEND=noninteractive apt-get install -y unbound
|
|
|
|
cp dns.conf /etc/unbound/unbound.conf.d/
|