mirror of
https://github.com/telekom-security/tpotce.git
synced 2025-04-29 11:48:52 +00:00

remove portainer remove wetty remove netdata add cockpit tweak fail2ban for cockpit, sshd, nginx update logo to 18.10 remove configs with regard to portainer, wetty, netdata adjust packages for install.sh, preseed
26 lines
889 B
Bash
Executable file
26 lines
889 B
Bash
Executable file
#!/bin/bash
|
||
# 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
|
||
myLOCALIP=$(hostname -I | awk '{ print $1 }')
|
||
myEXTIP=$(/opt/tpot/bin/myip.sh)
|
||
if [ "$myEXTIP" = "" ];
|
||
then
|
||
myEXTIP=$myLOCALIP
|
||
fi
|
||
mySSHUSER=$(cat /etc/passwd | grep 1000 | cut -d ':' -f1)
|
||
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
|
||
sed -i "s#ADMIN:.*#ADMIN: https://$myLOCALIP:64294[0m#" /etc/issue
|
||
tee /data/ews/conf/ews.ip << EOF
|
||
[MAIN]
|
||
ip = $myEXTIP
|
||
EOF
|
||
tee /opt/tpot/etc/compose/elk_environment << EOF
|
||
MY_EXTIP=$myEXTIP
|
||
MY_INTIP=$myLOCALIP
|
||
MY_HOSTNAME=$HOSTNAME
|
||
EOF
|
||
chown tpot:tpot /data/ews/conf/ews.ip
|
||
chmod 760 /data/ews/conf/ews.ip
|