Re: Startup scipt

2008-12-17 Thread Mel
On Tuesday 16 December 2008 01:54:57 Giorgos Keramidas wrote:

 The second invocation uses another set of options from `rc.conf':

 moused_ums0_enable
 moused_ums0_port
 moused_ums0_type
 moused_ums0_flags

 The support for these non-default options is implemented using a small
 local hack in `src/etc/rc.d/moused':


 http://svn.freebsd.org/viewvc/base/head/etc/rc.d/moused?view=annotate#l24

 It would be great if you found some way to integrate this with the rest
 of rc.d.  This way more scripts can support multiple instances of the
 underlying service :)

Better like jail is done. I like the fact that jail_list is what is started 
upon startup but you can have many more jail_foo defined. Removing one from 
the list will disable it on boot, but it is still enabled by itself, so 
that /etc/rc.d/jail start foo is still valid.

-- 
Mel

Problem with today's modular software: they start with the modules
and never get to the software part.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Startup scipt

2008-12-17 Thread Giorgos Keramidas
On Wed, 17 Dec 2008 10:05:05 +0100, Mel fbsd.questi...@rachie.is-a-geek.net 
wrote:
 On Tuesday 16 December 2008 01:54:57 Giorgos Keramidas wrote:

 The second invocation uses another set of options from `rc.conf':

 moused_ums0_enable
 moused_ums0_port
 moused_ums0_type
 moused_ums0_flags

 The support for these non-default options is implemented using a small
 local hack in `src/etc/rc.d/moused':

 http://svn.freebsd.org/viewvc/base/head/etc/rc.d/moused?view=annotate#l24

 It would be great if you found some way to integrate this with the rest
 of rc.d.  This way more scripts can support multiple instances of the
 underlying service :)

 Better like jail is done. I like the fact that jail_list is what is
 started upon startup but you can have many more jail_foo
 defined. Removing one from the list will disable it on boot, but it is
 still enabled by itself, so that /etc/rc.d/jail start foo is still valid.

That's a fine idea :)

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Startup scipt

2008-12-15 Thread Wojciech Puchar

instance it has first one already runned. And he add second instance
because of it is not enough to have only one instance. So
proftpd_enable=YES will enable all instances
proftpd_enable=NO will disable all instances
proftpd_external_enable=NO will disable some instance

For example: user run three instances, but now want to disable one of
them. So it write service_name_instance_name_enable=NO


What do you think about this improvement?


it's EXCELLENT. when i needed this i simply started things from 
/etc/rc.local but then killing/restarting any of them required manually

doing ps |grep, kill etc...

please contribute patches. it will be very useful.

make sure for every instance you can give different parameters.

example - one machine services 2 customers in one building, has 2 
ethernets (+1 for external traffic), and i would like to run 2 samba 
servers with configs:


/usr/local/etc/smb-net1.conf
/usr/local/etc/smb-net2.conf

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Startup scipt

2008-12-15 Thread Giorgos Keramidas
On Mon, 15 Dec 2008 23:56:43 +0200, KES kes-...@yandex.ru wrote:
 It there feature (option in rc.subr) to run multiple services at once?

None that I know of.

 For example I have 'service'
 to run service with specific flags I want to do:

 service_enable=YES
 service_instances=instance1 instance2
 service_instance1_flags=-flag 1 rl0
 service_instance2_flags=-flag 2 rl2

 so rc.subr will run:
 service -flag 1 rl0
 service -flag 2 rl2

It may be possible to simulate what /etc/rc.d/moused does.  In recent
versions of the script, the following commands are supported:

/etc/rc.d/moused start

/etc/rc.d/moused start ums0

The first invocation uses the 'default' options from `rc.conf':

moused_enable
moused_port
moused_type
moused_flags

The second invocation uses another set of options from `rc.conf':

moused_ums0_enable
moused_ums0_port
moused_ums0_type
moused_ums0_flags

The support for these non-default options is implemented using a small
local hack in `src/etc/rc.d/moused':

http://svn.freebsd.org/viewvc/base/head/etc/rc.d/moused?view=annotate#l24

It would be great if you found some way to integrate this with the rest
of rc.d.  This way more scripts can support multiple instances of the
underlying service :)

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org