Re: auto start mysql and snort OpenBSD 4.0

2006-12-28 Thread Nico Meijer
Hi Edy,

I dunno about snort, but MySQL I do use.

 Any clue?

Read this:
http://www.openbsdsupport.org/mysql.htm

HTH... Nico



Re: auto start mysql and snort OpenBSD 4.0

2006-12-28 Thread Daniel Ouellet

Edy wrote:

Hi

I have googled and read on the man pages but something is missing here.

For example i have the following in my /etc/rc.local

if [ X${mysql} == XYES -a -x /usr/local/bin/safe_mysqld ]; then
echo -n  ' mysqld'; /usr/local/share/mysql/mysql.server start
fi

if [ X${snort} == XYES -a -x /usr/local/bin/snort ]; then
echo -n ' snort';   /usr/local/bin/snort -D -d -i fxp0 -c 
/etc/snort/snort.conf -u _snort -g _snort

fi

and in my /etc/rc.conf.local
mysql=YES
snort=YES

When the system rebooted, both processes are not started.

If i were to execute example echo -n  ' mysqld'; 
/usr/local/share/mysql/mysql.server start from command line, mysql 
started successfully.


Any clue?


I don't know about snort, but as far as MySQL is concern, why don't you 
do it right.


http://www.openbsdsupport.org/mysql.htm#/etc/rc.local

Then adjust it for your snort needs.

Best,

Daniel



Re: auto start mysql and snort OpenBSD 4.0

2006-12-28 Thread Edy

Daniel,

I have been to that site already and it does not start mysql when the 
system rebooted but i could start mysql by using the command.


Cheers,
-e

Daniel Ouellet wrote:

Edy wrote:

Hi

I have googled and read on the man pages but something is missing here.

For example i have the following in my /etc/rc.local

if [ X${mysql} == XYES -a -x /usr/local/bin/safe_mysqld ]; then
echo -n  ' mysqld'; /usr/local/share/mysql/mysql.server start
fi

if [ X${snort} == XYES -a -x /usr/local/bin/snort ]; then
echo -n ' snort';   /usr/local/bin/snort -D -d -i fxp0 -c 
/etc/snort/snort.conf -u _snort -g _snort

fi

and in my /etc/rc.conf.local
mysql=YES
snort=YES

When the system rebooted, both processes are not started.

If i were to execute example echo -n  ' mysqld'; 
/usr/local/share/mysql/mysql.server start from command line, mysql 
started successfully.


Any clue?


I don't know about snort, but as far as MySQL is concern, why don't 
you do it right.


http://www.openbsdsupport.org/mysql.htm#/etc/rc.local

Then adjust it for your snort needs.

Best,

Daniel




Re: auto start mysql and snort OpenBSD 4.0

2006-12-28 Thread Dan Farrell
I found this from Google quite some time ago, and now run 3 snort/mysql
boxes on 3.9 and 4.0 with no probs-

http://www.nomoa.com/bsd/mysql.htm

Happy Hunting,

Dan Farrell
Applied Innovations
[EMAIL PROTECTED]
 

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of
 Daniel Ouellet
 Sent: Thursday, December 28, 2006 2:21 PM
 To: misc@openbsd.org
 Subject: Re: auto start mysql and snort OpenBSD 4.0
 
 Edy wrote:
  Hi
 
  I have googled and read on the man pages but something is missing
here.
 
  For example i have the following in my /etc/rc.local
 
  if [ X${mysql} == XYES -a -x /usr/local/bin/safe_mysqld ]; then
  echo -n  ' mysqld'; /usr/local/share/mysql/mysql.server start
  fi
 
  if [ X${snort} == XYES -a -x /usr/local/bin/snort ]; then
  echo -n ' snort';   /usr/local/bin/snort -D -d -i fxp0 -c
  /etc/snort/snort.conf -u _snort -g _snort
  fi
 
  and in my /etc/rc.conf.local
  mysql=YES
  snort=YES
 
  When the system rebooted, both processes are not started.
 
  If i were to execute example echo -n  ' mysqld';
  /usr/local/share/mysql/mysql.server start from command line, mysql
  started successfully.
 
  Any clue?
 
 I don't know about snort, but as far as MySQL is concern, why don't
you
 do it right.
 
 http://www.openbsdsupport.org/mysql.htm#/etc/rc.local
 
 Then adjust it for your snort needs.
 
 Best,
 
 Daniel



Re: auto start mysql and snort OpenBSD 4.0

2006-12-28 Thread Vijay Sankar
It should be /usr/local/bin/mysqld_safe NOT safe_mysqld

Vijay

On Fri, 2006-29-12 at 03:44 +0800, Edy wrote:
 Daniel,
 
 I have been to that site already and it does not start mysql when the 
 system rebooted but i could start mysql by using the command.
 
 Cheers,
 -e
 
 Daniel Ouellet wrote:
  Edy wrote:
  Hi
 
  I have googled and read on the man pages but something is missing here.
 
  For example i have the following in my /etc/rc.local
 
  if [ X${mysql} == XYES -a -x /usr/local/bin/safe_mysqld ]; then
  echo -n  ' mysqld'; /usr/local/share/mysql/mysql.server start
  fi
 
  if [ X${snort} == XYES -a -x /usr/local/bin/snort ]; then
  echo -n ' snort';   /usr/local/bin/snort -D -d -i fxp0 -c 
  /etc/snort/snort.conf -u _snort -g _snort
  fi
 
  and in my /etc/rc.conf.local
  mysql=YES
  snort=YES
 
  When the system rebooted, both processes are not started.
 
  If i were to execute example echo -n  ' mysqld'; 
  /usr/local/share/mysql/mysql.server start from command line, mysql 
  started successfully.
 
  Any clue?
 
  I don't know about snort, but as far as MySQL is concern, why don't 
  you do it right.
 
  http://www.openbsdsupport.org/mysql.htm#/etc/rc.local
 
  Then adjust it for your snort needs.
 
  Best,
 
  Daniel
 
 
 !DSPAM:1,45941f1f19861357919056!
 
-- 
Vijay Sankar, M.Eng., P.Eng.
ForeTell Technologies Limited
59 Flamingo Avenue, Winnipeg, MB, Canada R3J 0X6
Phone: 204 885 9535, E-Mail: [EMAIL PROTECTED]



Re: auto start mysql and snort OpenBSD 4.0

2006-12-28 Thread Daniel Ouellet

Edy wrote:

Daniel,

I have been to that site already and it does not start mysql when the 
system rebooted but i could start mysql by using the command.


Cheers,
-e


If you follow the instructions it does.

But like many you most likely put the starting scripts inside 
rc.conf.local instead of rc.local.


And it does work plenty.

Check your configuration again.

Best,

Daniel



Re: auto start mysql and snort OpenBSD 4.0

2006-12-28 Thread Edy

Thanks for those who has replied :)

The following is the working version:

if [ -x /usr/local/bin/mysqld_safe ]; then
   su -c _mysql root -c '/usr/local/bin/mysqld_safe '  /dev/null 
 echo -n ' mysql'

   sleep 20;
fi

# Start Snort after waiting for Mysql to complete (set it to 20seconds)
if [ -x /usr/local/bin/snort ]; then
   /usr/local/bin/snort -D -d -i fxp0 -c /etc/snort/snort.conf -u 
_snort -g _snort  /dev/null  echo -n ' snort'

fi

Cheers,
-e

Edy wrote:

Daniel,

I have been to that site already and it does not start mysql when the 
system rebooted but i could start mysql by using the command.


Cheers,
-e

Daniel Ouellet wrote:

Edy wrote:

Hi

I have googled and read on the man pages but something is missing here.

For example i have the following in my /etc/rc.local

if [ X${mysql} == XYES -a -x /usr/local/bin/safe_mysqld ]; then
echo -n  ' mysqld'; /usr/local/share/mysql/mysql.server start
fi

if [ X${snort} == XYES -a -x /usr/local/bin/snort ]; then
echo -n ' snort';   /usr/local/bin/snort -D -d -i fxp0 -c 
/etc/snort/snort.conf -u _snort -g _snort

fi

and in my /etc/rc.conf.local
mysql=YES
snort=YES

When the system rebooted, both processes are not started.

If i were to execute example echo -n  ' mysqld'; 
/usr/local/share/mysql/mysql.server start from command line, mysql 
started successfully.


Any clue?


I don't know about snort, but as far as MySQL is concern, why don't 
you do it right.


http://www.openbsdsupport.org/mysql.htm#/etc/rc.local

Then adjust it for your snort needs.

Best,

Daniel