Files
tpotce/installer/etc/rc.local

15 lines
413 B
Plaintext
Raw Normal View History

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 }')
myEXTIP=$(curl myexternalip.com/raw)
sed -i "s#IP:.*#IP: $myLOCALIP, $myEXTIP#" /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
2015-03-03 15:59:20 +01:00
chown tpot:tpot /data/ews/conf/ews.ip
2015-01-28 17:08:34 +01:00
if [ -f /var/run/check.lock ];
then rm /var/run/check.lock
fi