2015-01-28 16:08:34 +00:00
|
|
|
#!/bin/sh -e
|
|
|
|
# Let's add the first local ip to the /etc/issue and ews.ip file
|
2015-02-05 13:03:27 +00:00
|
|
|
# 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
|
2015-01-28 16:08:34 +00:00
|
|
|
tee /data/ews/conf/ews.ip << EOF
|
|
|
|
[MAIN]
|
2015-02-05 13:03:27 +00:00
|
|
|
ip = $myEXTIP
|
2015-01-28 16:08:34 +00:00
|
|
|
EOF
|
2015-03-03 14:59:20 +00:00
|
|
|
chown tpot:tpot /data/ews/conf/ews.ip
|
2015-01-28 16:08:34 +00:00
|
|
|
if [ -f /var/run/check.lock ];
|
|
|
|
then rm /var/run/check.lock
|
|
|
|
fi
|
|
|
|
setupcon
|
|
|
|
exit 0
|