-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall
36 lines (31 loc) · 1.12 KB
/
install
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
#!/usr/bin/env bash
# installer for cme-dnssec-monitor / external-cds-monitor
# get scripts
if [[ ! -d /usr/local/sbin/cme-bind-dnssec ]]; then
sudo git clone ssh://git.flipkick.media/cme/cme-bind-dnssec /usr/local/sbin/cme-bind-dnssec
else
(
cd /usr/local/sbin/cme-bind-dnssec
sudo git reset --hard
sudo git pull
)
fi
sudo cp /usr/local/sbin/cme-bind-dnssec/cme-dnssec-monitor.service /etc/systemd/system/
sudo chown root:root /etc/systemd/system/cme-dnssec-monitor.service
sudo cp /usr/local/sbin/cme-bind-dnssec/cme-external-cds-monitor.service /etc/systemd/system/
sudo chown root:root /etc/systemd/system/cme-external-cds-monitor.service
#create config
if [[ ! -d /etc/cme && ! -f /etc/cme/dnsset-monitor.env ]]; then
sudo mkdir /etc/cme
cp dnssec-monitor.env /etc/cme/
fi
chown root:root -R /etc/cme
chmod 700 /etc/cme
chmod 600 /etc/cme/dnssec-monitor.env
#setup service
sudo systemctl enable cme-dnssec-monitor.service
sudo systemctl enable cme-external-cds-monitor.service
sudo systemctl restart cme-dnssec-monitor.service
sudo systemctl restart cme-external-cds-monitor.service
sudo systemctl restart named
exit 0