taiga: поправлено получение IP

akrasnyh 64
parent ef62916841
commit e0b203eec5

@ -7,9 +7,9 @@
#arch profile_directory status
# AMD64 Profiles
amd64 scratch/amd64/20 stable
amd64 directory/amd64/20 dev
amd64 games/amd64/20 dev
amd64 scratch/amd64/20 stable
amd64 taiga/amd64/20 dev
# vim: set ts=8

@ -1,5 +1,10 @@
# Calculate run=/bin/bash grep(/var/calculate/ini.env,taiga\.example.org)!=
# Подставим IP eth0, пока у шаблонов нет необходимой функции
IP=$(ifconfig eth0 | grep 'inet ' | awk '{print $2}')
interface=$(ip route | grep -m 1 'default via' | awk '{print $5}')
if [[ -z $interface ]]
then
interface=eth0
fi
IP=$(ifconfig $interface 2>/dev/null | grep 'inet ' | awk '{print $2}')
sed -i -E "s/(taiga_sites_domain =).*/\1 $IP/g" /var/calculate/ini.env

Loading…
Cancel
Save