Установил Package: alien (8.52) [ Debian 3.1 Sarge r2 ]
Командой alien netams-3.3.5-1.suse10.i586.rpm создал файл deb
далее установил его при помощи dpkg -i ххх.deb
Пытаюсь запустить /etc/init.d/netams start
Спотыкается на строчке #24: . /etc/rc.status
Файл /etc/init.d/netams
Код: Выделить всё
#!/bin/sh
# $Id: netams-linux-startup.sh,v 1.1.2.5 2006/06/02 19:33:48 anton Exp $
# netams Startup shell script for NeTAMS
#
# V.N. Chernenko <vnc [ЯСНО chto} vnc org ua>
#
### BEGIN INIT INFO
# Provides: netams
# Required-Start: $local_fs mysql apache2
# Required-Stop: $local_fs mysql
# Default-Start: 3 5
# Default-Stop: 0 1 2 6
# Description: NeTAMS (Network Traffic Accounting and Management Software)
# Daemon for accounting network traffic data.
# Short-Description: Start the netams daemon
### END INIT INFO
DAEMONDIR=/usr/sbin
CONFIG=/etc/netams/netams.cfg
PIDFILE=/var/run/netams.pid
NETAMS_BIN=$DAEMONDIR/netams
NETAMS_ARGS="-lf $CONFIG"
. /etc/rc.status
# First reset status of this service
rc_reset
# Return values acc. to LSB for all commands but status:
# 0 - success
# 1 - generic or unspecified error
# 2 - invalid or excess argument(s)
# 3 - unimplemented feature (e.g. "reload")
# 4 - insufficient privilege
# 5 - program is not installed
# 6 - program is not configured
# 7 - program is not running
#
# Note that starting an already running service, stopping
# or restarting a not-running service as well as the restart
# with force-reload (in case signalling is not supported) are
# considered a success.
case "$1" in
start)
echo -n "Starting netams "
## Start daemon with startproc(8). If this fails
## the echo return value is set appropriate.
# NOTE: startproc returns 0, even if service is
# already running to match LSB spec.
startproc -q -p $PIDFILE $NETAMS_BIN $NETAMS_ARGS
# Remember status and be verbose
rc_status -v
;;
stop)
echo -n "Shutting down netams "
netamsctl shutdown > /dev/null
rm -rf $PIDFILE
# Remember status and be verbose
rc_status -v
;;
try-restart)
## Stop the service and if this succeeds (i.e. the
## service was running before), start it again.
## Note: try-restart is not (yet) part of LSB (as of 0.7.5)
$0 status >/dev/null && $0 restart
# Remember status and be quiet
rc_status
;;
restart)
## Stop the service and regardless of whether it was
## running or not, start it again.
$0 stop
$0 start
# Remember status and be quiet
rc_status
;;
status)
echo -n "Checking for service spamd "
## Check status with checkproc(8), if process is running
## checkproc will return with exit status 0.
# Return value is slightly different for the status command:
# 0 - service running
# 1 - service dead, but /var/run/ pid file exists
# 2 - service dead, but /var/lock/ lock file exists
# 3 - service not running
# NOTE: checkproc returns LSB compliant status values.
checkproc -p $PIDFILE $NETAMS_BIN
rc_status -v
;;
*)
echo "Usage: $0 {start|stop|status|try-restart|restart}"
exit 1
;;
esac
rc_exit
сравнил с другими аналогичными скриптами - вроде понятно...
Если есть у кого уже готовый /etc/init.d/netams - не помешал бы
но при старте ругается на отсутствие libpcap
В какой пакет входят данные необходимые файлы?
apt-get install libpcap не прокатывает
apt-get install libpcap-dev ?
Кажется прийдется собирать из сырцов в любом случае...
возникла проблема проблема не находит -lcrypto
тут спасибо Stannum - надо установить libssl-dev
Пошел искать что за сигнал такой приходит (Shutdown signal received at ...) что netams завершает работу
Надо быть внимательнее при работе с конфигом - например, вместо xl1 надо указать свой ethX.
При большом желании можно установить.
