LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-25-2007, 09:47 AM   #1
games1
LQ Newbie
 
Registered: Aug 2006
Posts: 14

Rep: Reputation: 0
Arrow startup script snortd !!!


pls tell me startup script snort

thanks

Last edited by games1; 04-25-2007 at 09:58 AM.
 
Old 04-25-2007, 12:10 PM   #2
bsdunix
Senior Member
 
Registered: May 2006
Distribution: BeOS, BSD, Caldera, CTOS, Debian, LFS, Mac, Mandrake, Red Hat, Slackware, Solaris, SuSE
Posts: 1,761

Rep: Reputation: 80
Since you didn't provide any information on your setup, don't know if this is what your looking for:

"Running in Daemon Mode"
http://www.snort.org/docs/snort_htma...61/node20.html

A Google search always helps:

http://www.google.com/search?hl=en&q...rt+stop+script
 
Old 04-25-2007, 11:18 PM   #3
games1
LQ Newbie
 
Registered: Aug 2006
Posts: 14

Original Poster
Rep: Reputation: 0
Arrow

Quote:
Originally Posted by bsdunix
Since you didn't provide any information on your setup, don't know if this is what your looking for:

"Running in Daemon Mode"
http://www.snort.org/docs/snort_htma...61/node20.html

A Google search always helps:

http://www.google.com/search?hl=en&q...rt+stop+script

the first thanks alot then continue help me pls
my script to startup snort :

#!/bin/sh
#
# snortd Start/Stop the snort IDS daemon.
#
# chkconfig: 2345 40 60
# description: snort is a lightweight network intrusion detection tool \
# that currently detects more than 1100 host and network \
# vulnerabilities, portscans, backdoors, and more.
# processname: snort
# config: /etc/snort/snort.conf

# Source function library.
./etc/rc.d/init.d/functions

# Specify your network interface here
INTERFACE=eth0
LOGDIR=/var/log/snort/
CONFIGFILE=/etc/snort/snort.conf
SNORTBINARY=/usr/local/bin/snort

RETVAL=0

start() {
echo -n $"Starting snort: "
daemon $SNORTBINARY -u snort -g snort -s -d -D \
-i $INTERFACE -l $LOGDIR -c $CONFIGFILE
RETVAL=$?
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/snortd
echo
echo -n $"(log to " $LOGDIR " with configfile " $CONFIGFILE ")"
echo
}

stop() {
echo -n $"Stopping snort: "
killproc snort
RETVAL=$?
rm -f /var/lock/subsys/snortd
echo
}

dostatus() {
status snort
RETVAL=$?
}

restart() {
stop
start
RETVAL=$?
}

condrestart() {
[ -e /var/lock/subsys/snortd ] && restart || :
}

# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
status)
dostatus
;;
restart|reload)
restart
;;
condrestart)
condrestart
;;
*)
echo "Usage: snortd {start|stop|status|restart|condrestart}"
exit 1
esac

exit $RETVAL


then i type :

# /etc/rc.d/init.d/snortd start
/etc/rc.d/init.d/snortd: line 13: ./etc/rc.d/init.d/functions: No such file or directory
Starting snort: /etc/rc.d/init.d/snortd: line 25: daemon: command not found

(log to /var/log/snort/ with configfile /etc/snort/snort.conf )


I don't know, pls repair for me

Last edited by games1; 04-25-2007 at 11:25 PM.
 
Old 04-26-2007, 08:02 AM   #4
bsdunix
Senior Member
 
Registered: May 2006
Distribution: BeOS, BSD, Caldera, CTOS, Debian, LFS, Mac, Mandrake, Red Hat, Slackware, Solaris, SuSE
Posts: 1,761

Rep: Reputation: 80
Quote:
# /etc/rc.d/init.d/snortd start
/etc/rc.d/init.d/snortd: line 13: ./etc/rc.d/init.d/functions: No such file or directory
Starting snort: /etc/rc.d/init.d/snortd: line 25: daemon: command not found
The script your using can't find these files. Is the script your using for your distro? What is your disto? Do you even have these files? If you do, then they are not located where the script is looking for them. Please provide more information about how you installed snort.
 
Old 04-26-2007, 11:42 AM   #5
games1
LQ Newbie
 
Registered: Aug 2006
Posts: 14

Original Poster
Rep: Reputation: 0
Arrow

Quote:
Originally Posted by bsduni:confused: :confused: x
The script your using can't find these files. Is the script your using for your distro? What is your disto? Do you even have these files? If you do, then they are not located where the script is looking for them. Please provide more information about how you installed snort.

thaks "bsdunix"

I'm install snort on RH9.0 and working with guide of http://www.snort.org/docs/ --> Snort Installation Manual - Snort, MySQL, Redhat 7.3

error:
/etc/rc.d/init.d/snortd: line 13: ./etc/rc.d/init.d/functions: No such file or directory

I'm repaired. But
I don't know why :
#/etc/rc.d/init.d/snortd start
Starting snort: /etc/rc.d/init.d/snortd: line 25: daemon: command not found


And line 25 in script to startup snort is :
daemon $SNORTBINARY -u snort -g snort -s -d -D \
-i $INTERFACE -l $LOGDIR -c $CONFIGFILE
RETVAL=$?

pls help me !

Last edited by games1; 04-26-2007 at 11:44 AM.
 
Old 04-26-2007, 12:46 PM   #6
bsdunix
Senior Member
 
Registered: May 2006
Distribution: BeOS, BSD, Caldera, CTOS, Debian, LFS, Mac, Mandrake, Red Hat, Slackware, Solaris, SuSE
Posts: 1,761

Rep: Reputation: 80
Quote:
#/etc/rc.d/init.d/snortd start
Starting snort: /etc/rc.d/init.d/snortd: line 25: daemon: command not found
The script expects to find the daemon location with this variable:
Code:
SNORTBINARY=/usr/local/bin/snort
Verify that snort is located there. If located in a different location, edit the SNORTBINARY variable for the correct location.
 
Old 04-27-2007, 01:46 AM   #7
games1
LQ Newbie
 
Registered: Aug 2006
Posts: 14

Original Poster
Rep: Reputation: 0
Arrow

Quote:
Originally Posted by bsdunix
The script expects to find the daemon location with this variable:
Code:
SNORTBINARY=/usr/local/bin/snort
Verify that snort is located there. If located in a different location, edit the SNORTBINARY variable for the correct location.


yes I found a file snort in : /usr/local/bin
it about 3.4M --> MIME type : application/x-executable-binary

(i'm a student in VietNam country and a beginer with linux so pls help me :d)
 
Old 04-27-2007, 10:15 AM   #8
bsdunix
Senior Member
 
Registered: May 2006
Distribution: BeOS, BSD, Caldera, CTOS, Debian, LFS, Mac, Mandrake, Red Hat, Slackware, Solaris, SuSE
Posts: 1,761

Rep: Reputation: 80
Quote:
yes I found a file snort in : /usr/local/bin
Per the guide your following, did you do this before starting snort?
Code:
# cd /etc/rc.d/init.d
# chmod 755 snortd
# chkconfig --level 2345 snortd on
If you did, then I recommend you post your problem on the snort forum:

http://www.snort.org/reg-bin/forums.cgi
 
Old 05-01-2007, 06:54 AM   #9
games1
LQ Newbie
 
Registered: Aug 2006
Posts: 14

Original Poster
Rep: Reputation: 0
Arrow

Quote:
Originally Posted by bsdunix
Per the guide your following, did you do this before starting snort?
Code:
# cd /etc/rc.d/init.d
# chmod 755 snortd
# chkconfig --level 2345 snortd on
If you did, then I recommend you post your problem on the snort forum:

http://www.snort.org/reg-bin/forums.cgi
I'm very bored when i done :
# cd /etc/rc.d/init.d
# chmod 755 snortd
# chkconfig --level 2345 snortd on
but it didn't run and i asked in http://www.snort.org/reg-bin/forums.cg, but no anybody answer

if you can pls help me !!!
 
Old 05-01-2007, 11:52 PM   #10
games1
LQ Newbie
 
Registered: Aug 2006
Posts: 14

Original Poster
Rep: Reputation: 0
I entreat everybody please help me to complete install snort on RH9 run. I can't understood why it didn't run
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
'cannot stat' script in /etc/rc.d/, try to run script at startup quintan Linux - Software 1 11-21-2005 02:53 AM
make install does not install daemons (clamd snortd). Is this a feature of tarball? Emmanuel_uk Linux - Newbie 3 11-15-2005 01:29 AM
How to call a script from a system startup script? jonatito Linux - Newbie 7 11-11-2005 09:40 PM
startup script under X + RH mehesque Linux - General 2 06-16-2004 05:48 PM
What's a startup script? rdaves@earthlink.net Linux - Newbie 1 05-22-2001 03:24 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:47 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration