Integrating firewalld into node_exporter script
Signed-off-by: Georg <georg@lysergic.dev>
This commit is contained in:
parent
5f0c272343
commit
9c35dec520
@ -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