prepare for new ewsposter

This commit is contained in:
t3chn0m4g3
2020-10-15 09:14:30 +00:00
parent 6b37578d8d
commit b28cc2edd0
4 changed files with 23 additions and 30 deletions

View File

@ -2,6 +2,7 @@
# Let's add the first local ip to the /etc/issue and external ip to ews.ip file
# If the external IP cannot be detected, the internal IP will be inherited.
source /etc/environment
myUUID=$(lsblk -o MOUNTPOINT,UUID | grep "/" | awk '{ print $2 }')
myLOCALIP=$(hostname -I | awk '{ print $1 }')
myEXTIP=$(/opt/tpot/bin/myip.sh)
if [ "$myEXTIP" = "" ];
@ -26,6 +27,7 @@ tee /data/ews/conf/ews.ip << EOF
ip = $myEXTIP
EOF
tee /opt/tpot/etc/compose/elk_environment << EOF
HONEY_UUID=$myUUID
MY_EXTIP=$myEXTIP
MY_INTIP=$myLOCALIP
MY_HOSTNAME=$HOSTNAME