2015-12-08 15:47:39 +01:00
|
|
|
|
#!/bin/bash
|
|
|
|
|
# Let's add the first local ip to the /etc/issue and external ip to ews.ip file
|
|
|
|
|
source /etc/environment
|
2015-02-05 14:03:27 +01:00
|
|
|
|
myLOCALIP=$(hostname -I | awk '{ print $1 }')
|
2017-04-19 12:22:51 +00:00
|
|
|
|
myEXTIP=$(/usr/share/tpot/bin/myip.sh)
|
2017-03-15 09:28:12 +00:00
|
|
|
|
sed -i "s#IP:.*#IP: $myLOCALIP ($myEXTIP)[0m#" /etc/issue
|
|
|
|
|
sed -i "s#SSH:.*#SSH: ssh -l tsec -p 64295 $myLOCALIP[0m#" /etc/issue
|
|
|
|
|
sed -i "s#WEB:.*#WEB: https://$myLOCALIP:64297[0m#" /etc/issue
|
2015-01-28 17:08:34 +01:00
|
|
|
|
tee /data/ews/conf/ews.ip << EOF
|
|
|
|
|
[MAIN]
|
2015-02-05 14:03:27 +01:00
|
|
|
|
ip = $myEXTIP
|
2015-01-28 17:08:34 +01:00
|
|
|
|
EOF
|
2017-04-19 12:22:51 +00:00
|
|
|
|
tee /etc/tpot/elk/environment << EOF
|
2017-04-07 15:20:56 +00:00
|
|
|
|
MY_EXTIP=$myEXTIP
|
|
|
|
|
MY_HOSTNAME=$HOSTNAME
|
|
|
|
|
EOF
|
2016-06-19 00:20:02 +02:00
|
|
|
|
echo $myLOCALIP > /data/elk/logstash/mylocal.ip
|
2015-03-03 15:59:20 +01:00
|
|
|
|
chown tpot:tpot /data/ews/conf/ews.ip
|