andreymp
(usa Slackware)
Enviado em 10/05/2008 - 03:14h
Erro que aparece agora:
./new.sh: line 63: hostnome: command not found
Host = not found: 3(NXDOMAIN)
./new.sh: line 64: =: command not found
./new.sh: line 65: =: command not found
./new.sh: line 66: =: command not found
./new.sh: line 67: /home/${host}/cronus/conf/char_athena2.conf: No such file or directory
./new.sh: line 67: =: command not found
./new.sh: line 68: =: command not found
./new.sh: line 69: =: command not found
Parte do meu script que faz esse processo:
Configurar() {
echo "Login do host: "
read hostnome
echo "Nome do servidor: "
read svnome
echo "Nome de exibição no chat: "
read svchat
echo "IP do servidor: "
read ip
echo "Usuário da database: "
read svdb
echo "Senha do usuário da database: "
read svpw
############################################
# Variáveis e backups #
############################################
host = $(hostnome)
$loginconf = /home/${host}/cronus/conf/login_athena.conf
$loginconf2 = /home/${host}/cronus/conf/login_athena2.conf
$charconf = $(echo '/home/${host}/cronus/conf/char_athena.conf')
$charconf2 = $('/home/${host}/cronus/conf/char_athena2.conf')
$mapconf = /home/${host}/cronus/conf/map_athena.conf
$mapconf2 = /home/${host}/cronus/conf/map_athena2.conf
clear;
############################################
# Edição do char_athena.conf #
############################################
echo $charconf
read svpw
sed "/userid/s/s1/${svdb}/g" $charconf > $charconf2
sed "/passwd/s/p1/${svpw}/g" $charconf2 > $charconf
sed "/server_name/s/Cronus/${svnome}/g" $charconf > $charconf2
sed "/wisp_server_name/s/Server/${svchat}/g" $charconf2 > $charconf
sed "/login_ip/s/127.0.0.1/${ip}/g" $charconf > $charconf2
sed "/bind_ip/s/127.0.0.1/${ip}/g" $charconf2 > $charconf
sed "/char_ip/s/127.0.0.1/${ip}/g" $charconf > $charconf2
echo "Arquivo char-athena.conf - configurado com êxito."