shell-script-pt
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: RES: [shell-script] Colocar o ip em arquivo


From: Bash
Subject: Re: RES: [shell-script] Colocar o ip em arquivo
Date: Mon, 21 Jan 2002 12:46:12 -0200

Infelizmente não resolveu o problema, continuo com o mesmo erro.

Não seria algo dentro do script???

#!/bin/bash

ip_atual=`/sbin/ifconfig eth0 | /bin/grep inet | /usr/bin/cut -d : -f 2 | /bin/awk '{print $1}'`
ip_antigo=`/usr/bin/cut -d " " -f 2 /etc/httpd/conf/ip.conf`

if [ "$ip_atual" != "$ip_antigo" ]
then
echo "NameVirtualHost $ip_atual" > /etc/httpd/conf/ip.conf
/etc/init.d/httpd restart
fi

At 12:24 21/01/2002 -0200, you wrote:
Se for csh ou tcsh, basta executar rehash
Se for bash, execute hash -r
Isso deve limpar a hash que o shell mantem para o caminho de arquivo executaveis.

[]'s
Silvano



--
Bash
mailto:address@hidden
http://www.aboutlinux.com.br/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]