Integrating firewalld into node_exporter script
Signed-off-by: Georg <georg@lysergic.dev>
This commit is contained in:
parent
333c4a82b8
commit
74f3b0a11f
@ -27,6 +27,13 @@ ExecStart=/opt/node_exporter/node_exporter --web.listen-address=":9200"
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl enable --now node_exporter
|
||||
if [ -x $(command -v firewall-cmd) ]
|
||||
then
|
||||
firewall-cmd --zone=internal --add-port=9200/tcp --permanent
|
||||
firewall-cmd --reload
|
||||
else
|
||||
echo "No firewalld, skipping."
|
||||
fi
|
||||
echo "OK"
|
||||
else
|
||||
echo "Found traces of an existing installation. Aborted."
|
||||
|
Loading…
Reference in New Issue
Block a user