- Erro ao iniciarl ClamAV
+ Responder ao Tópico
-
Erro ao iniciarl ClamAV
Seguinte pessoa..
instalei belezinha o ClamAV..dai peguei um desses scripts de inicializacao na internet, e criei ele num arquivo...dai quando eu executo ele da a seguinte mensagem de erro:
[root@servdados rc.d]# ./clamav
./clamav: line 79: syntax error: unexpected end of file
#amd Script to start/stop clamd.
#
# chkconfig: - 61 39
# description: clamd is an antivirus daemon.
#
#processname: clamd
#config: /etc/clamav.conf
#pidfile: /var/run/clamav/clamd.pid
# Source function library
. /etc/rc.d/init.d/functions
# Get network config
. /etc/sysconfig/network
test -f /etc/clamav.conf || exit 0
RETVAL=0
start() {
echo -n $"Starting Clam AV daemon: "
daemon /usr/sbin/clamd
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/clamd
return $RETVAL
}
ja faz dias que estou nisso, se alguem pudesse me ajudar, ficaria imensamente grato..
stop() {
echo -n $"Stopping Clam AV daemon: "
killproc clamd
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f /var/run/clamav/clamd.pid /var/lock/subsys/clamd
return $RETVAL
}
restart() {
stop
start
}
reload() {
echo -n $"Reloading log file: "
killproc clamd -SIGHUP
RETVAL=$?
echo
return $RETVAL
}
case "$1" in
start)
start
#!/bin/sh
#
# clamd Script to start/stop clamd.
#
# chkconfig: - 61 39
# description: clamd is an antivirus daemon.
#
# processname: clamd
# config: /etc/clamav.conf
# pidfile: /var/run/clamav/clamd.pid
# Source function library
. /etc/rc.d/init.d/functions
"clamav" 78L, 1238C 68,0-1 81%
}
reload() {
echo -n $"Reloading log file: "
killproc clamd -SIGHUP
RETVAL=$?
echo
return $RETVAL
}
case "$1" in
start)
start
#!/bin/sh
#
# clamd Script to start/stop clamd.
#
# chkconfig: - 61 39
# description: clamd is an antivirus daemon.
#
# processname: clamd
# config: /etc/clamav.conf
# pidfile: /var/run/clamav/clamd.pid
# Source function library
. /etc/rc.d/init.d/functions
# Get network config
. /etc/sysconfig/network
test -f /etc/clamav.conf || exit 0
RETVAL=0
start() {
echo -n $"Starting Clam AV daemon: "
"clamd" 79L, 1145C 1,1 Top
-
Erro ao iniciarl ClamAV
Observe que falta fechar } na função start
acrecente uma linha no final do arquivo contendo
}
sai salvando e vai pro abraço
-
Erro ao iniciarl ClamAV
[root@servnet tmp]# ./clamav
./clamav: line 81: syntax error: unexpected end of file
deu esse erro agora..
-
Erro ao iniciarl ClamAV
É que o site tira a formatação e fica difícil analisar, procura na internet por este script e compare, ou disponibilize em alhum lugar onde eu possa baixa-lo para analisa-lo.
-
Erro ao iniciarl ClamAV
Outra coisa, se vc não cometeu erro ao colar no site, então várias partes do script estão repetidas, caso contrário deveria estar assim:
#!/bin/sh
#
# clamd Script to start/stop clamd.
#
# chkconfig: - 61 39
# description: clamd is an antivirus daemon.
#
# processname: clamd
# config: /etc/clamav.conf
# pidfile: /var/run/clamav/clamd.pid
# Source function library
. /etc/rc.d/init.d/functions
# Get network config
. /etc/sysconfig/network
test -f /etc/clamav.conf || exit 0
RETVAL=0
start() {
echo -n $"Starting Clam AV daemon: "
daemon /usr/sbin/clamd
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/clamd
return $RETVAL
}
stop() {
echo -n $"Stopping Clam AV daemon: "
killproc clamd
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f /var/run/clamav/clamd.pid /var/lock/subsys/clamd
return $RETVAL
}
restart() {
stop
start
}
reload() {
echo -n $"Reloading log file: "
killproc clamd -SIGHUP
RETVAL=$?
echo
return $RETVAL
}
-
Erro ao iniciarl ClamAV
mesmo assim nao inicia..nao da mais o erro, mas tbm nao inicao..eu tentei o comando clamd , e da o seguinte erro tbm
[root@servnet init.d]# /usr/local/sbin/clamd
ERROR: Database initialization error.
-
Erro ao iniciarl ClamAV
Observe esta linha
test -f /etc/clamav.conf || exit 0
ela verifica se o arquivo /etc/clamav.conf existe, verifique se ele existe e esta configurado adequadamente.
observe que o script esta executando o /usr/sbin/clamd , tenha atenção em verificar se o script esta adequado a sua instalação.
-
Erro ao iniciarl ClamAV