sockstat

2005-08-06 Thread virtual
I want to know if I can check the connections with sockstat for a
particular group on the server, if not and you know another command that I
can use please tell me!
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


bash script

2005-08-05 Thread virtual
My knowledge in bash scripting is about medium not very advanced and all
so I am not attempting to make a connection limiter but what I want to
make is a script that checks the irc connections off a certain user and
takes some actions, mostly of this I know how to do but I got stuck at
this :
I write in a file we will call it users.allow the following:
Virtual 5
Test 7
Server 9
Power 2

This will be the file that will hold the limit of the users from where the
script reads when checks.
So my script will read from this file and if the user Virtual for example
has more than 5 connections he will kill all his processes that are
running in background.
But what what I don`t know how to do is make the script read, for example
if I start the script he starts reading from users.allow, I want it to
read an take each line, first taking the line 1 with user Virtual and
setting to a variable the number it has near it like $allow=5, next after
it finishes the process for Virtual takes Test etc.
So my need would be how can I get the script to read first line, do the
process I will make for it, then take the next line and do the process for
that user until end of file. And also after taking the first line for
example reading only the first block in it, the one with user so it can
set $user=Virtual and then to take the path with the number.
I would greatly apreciate if you can help me with this issue, I really
need this script but didn`t know what to look in the manuals for etc.
Also if you know a similar script please let me know.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]