tpotce/installer/etc/rc.local
2015-03-03 15:59:20 +01:00

16 lines
442 B
Bash
Executable file

#!/bin/sh -e
# Let's add the first local ip to the /etc/issue and ews.ip file
# export http_proxy=http://your.proxy.server:port/
myLOCALIP=$(hostname -I | awk '{ print $1 }')
myEXTIP=$(curl myexternalip.com/raw)
sed -i "s#IP:.*#IP: $myLOCALIP, $myEXTIP#" /etc/issue
tee /data/ews/conf/ews.ip << EOF
[MAIN]
ip = $myEXTIP
EOF
chown tpot:tpot /data/ews/conf/ews.ip
if [ -f /var/run/check.lock ];
then rm /var/run/check.lock
fi
setupcon
exit 0