Re: Manually starting RCng scripts disabled in rc.conf
On Monday 17 May 2004 18:51, Freddie Cash wrote: Is it possible to manually run an rcNG-style script with app_enable=NO in /etc/rc.conf? For instance, there are a few services that I don't want running all the time on my laptop (like Apache, Squid, DansGuardian) but that I need running now and then for development / testing purposes. As such, I have apache_enable=NO in my rc.conf to prevent Apache from starting at boot time. However, this also means that I cannot manually start Apache when I need it running, unless I use apachectl or run the httpd binary directly. And I can't use the RCng script to check the status, or restart, or any of the other nice things that RCng gives me. It would be much simpler/nicer if I could use the rcNG script to do this. Am I missing something simple, or is it just not possible to do what I want? I'd like to use the rc.d scripts to control everything, but if I have to enable them all in rc.conf and then manually stop them after each boot, I'll most likely end up writing my own non-RCng wrapper scripts for each app. :( What you could do is comment apache_enable=yes in rc.conf when you're not using it. Then if you need to start apache later on, just uncomment the line then do a /usr/local/etc/rc.d/apache start Antoine ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Manually starting RCng scripts disabled in rc.conf
On May 17, 2004 09:56 am, Antoine Jacoutot wrote: On Monday 17 May 2004 18:51, Freddie Cash wrote: Is it possible to manually run an rcNG-style script with app_enable=NO in /etc/rc.conf? For instance, there are a few services that I don't want running all the time on my laptop (like Apache, Squid, DansGuardian) but that I need running now and then for development / testing purposes. As such, I have apache_enable=NO in my rc.conf to prevent Apache from starting at boot time. However, this also means that I cannot manually start Apache when I need it running, unless I use apachectl or run the httpd binary directly. And I can't use the RCng script to check the status, or restart, or any of the other nice things that RCng gives me. It would be much simpler/nicer if I could use the rcNG script to do this. Am I missing something simple, or is it just not possible to do what I want? I'd like to use the rc.d scripts to control everything, but if I have to enable them all in rc.conf and then manually stop them after each boot, I'll most likely end up writing my own non-RCng wrapper scripts for each app. :( What you could do is comment apache_enable=yes in rc.conf when you're not using it. Then if you need to start apache later on, just uncomment the line then do a /usr/local/etc/rc.d/apache start That's the same as I'm doing now, although I'm manually editing rc.conf to change NO to YES and back again using sed. It's still an extra step that seems unnecessary. Perhaps there needs to be an app_enable_boot=YES kind of knob for rc.conf that would start (or not) the app at boot time, but that wouldn't prevent you from manually starting the app using the rc.d script. [shrug] -- Freddie Cash [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
RE: Manually starting RCng scripts disabled in rc.conf
There are no knobs in rc.conf for the applications you mentioned. Rc.conf does not have internal check to verify you have correct statements. So having apache_enable=YES in rc.conf does nothing and issues no error message telling you it is invalid. All ports are started from /usr/local/etc/rc.d/ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Freddie Cash Sent: Monday, May 17, 2004 12:51 PM To: [EMAIL PROTECTED] Subject: Manually starting RCng scripts disabled in rc.conf Is it possible to manually run an rcNG-style script with app_enable=NO in /etc/rc.conf? For instance, there are a few services that I don't want running all the time on my laptop (like Apache, Squid, DansGuardian) but that I need running now and then for development / testing purposes. As such, I have apache_enable=NO in my rc.conf to prevent Apache from starting at boot time. However, this also means that I cannot manually start Apache when I need it running, unless I use apachectl or run the httpd binary directly. And I can't use the RCng script to check the status, or restart, or any of the other nice things that RCng gives me. It would be much simpler/nicer if I could use the rcNG script to do this. Am I missing something simple, or is it just not possible to do what I want? I'd like to use the rc.d scripts to control everything, but if I have to enable them all in rc.conf and then manually stop them after each boot, I'll most likely end up writing my own non-RCng wrapper scripts for each app. :( Please CC: me as I'm not subscribed to [EMAIL PROTECTED] -- Freddie Cash [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Manually starting RCng scripts disabled in rc.conf
In the last episode (May 17), Freddie Cash said: Is it possible to manually run an rcNG-style script with app_enable=NO in /etc/rc.conf? For instance, there are a few services that I don't want running all the time on my laptop (like Apache, Squid, DansGuardian) but that I need running now and then for development / testing purposes. As such, I have apache_enable=NO in my rc.conf to prevent Apache from starting at boot time. However, this also means that I cannot manually start Apache when I need it running, unless I use apachectl or run the httpd binary directly. And I can't use the RCng script to check the status, or restart, or any of the other nice things that RCng gives me. It would be much simpler/nicer if I could use the rcNG script to do this. Am I missing something simple, or is it just not possible to do what I want? I'd like to use the rc.d scripts to control everything, but if I have to enable them all in rc.conf and then manually stop them after each boot, I'll most likely end up writing my own non-RCng wrapper scripts for each app. :( forcestart should do what you want, I think. -- Dan Nelson [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Manually starting RCng scripts disabled in rc.conf
Dan Nelson wrote: In the last episode (May 17), Freddie Cash said: Is it possible to manually run an rcNG-style script with app_enable=NO in /etc/rc.conf? For instance, there are a few services that I don't want running all the time on my laptop (like Apache, Squid, DansGuardian) but that I need running now and then for development / testing purposes. As such, I have apache_enable=NO in my rc.conf to prevent Apache from starting at boot time. However, this also means that I cannot manually start Apache when I need it running, unless I use apachectl or run the httpd binary directly. And I can't use the RCng script to check the status, or restart, or any of the other nice things that RCng gives me. It would be much simpler/nicer if I could use the rcNG script to do this. Am I missing something simple, or is it just not possible to do what I want? I'd like to use the rc.d scripts to control everything, but if I have to enable them all in rc.conf and then manually stop them after each boot, I'll most likely end up writing my own non-RCng wrapper scripts for each app. :( forcestart should do what you want, I think. In similar situations, I change /usr/local/etc/rc.d/whatever.sh to /usr/local/etc/rc.d/whatever.sh.notnow (or any other suffix) so it doesn't start at boot time, then start it up when I want with #/usr/local/etc/rc.d/whatever.sh.notnow start and stop it again in the obvious way. I'd be interested to know what the drawbacks to this approach are. PWR. ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Manually starting RCng scripts disabled in rc.conf
In the last episode (May 17), Peter Risdon said: In similar situations, I change /usr/local/etc/rc.d/whatever.sh to /usr/local/etc/rc.d/whatever.sh.notnow (or any other suffix) so it doesn't start at boot time, then start it up when I want with #/usr/local/etc/rc.d/whatever.sh.notnow start and stop it again in the obvious way. I'd be interested to know what the drawbacks to this approach are. The only drawback to that is if you upgrade the port, it'll stick a new copy of whatever.sh in rc.d for you. -- Dan Nelson [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Manually starting RCng scripts disabled in rc.conf
On May 17, 2004 10:16 am, JJB wrote: There are no knobs in rc.conf for the applications you mentioned. Rc.conf does not have internal check to verify you have correct statements. So having apache_enable=YES in rc.conf does nothing and issues no error message telling you it is invalid. All ports are started from /usr/local/etc/rc.d/ This is true only for non-RCng scripts that have the generic case statement with start/stop options. For instance, the www/apache13 port prior to around 1.3.29_4 used the old rc-style script. After that, it uses an RCng script which requires an entry in rc.conf to activate. Read through the comments in /usr/ports/www/apache13/files/apache.sh if you don't have it installed to see what I mean. RCng scripts require an entry in /etc/rc.conf along the lines of appname_enable=YES otherwise the script will fail to do anything. This works great for starting scripts at boot time as everything is configured / controlled via one central file. However, it's more of a pain than anything when you don't want the app to start at bootup, but want to start the app manually later on. There are workarounds by changing the name of the startup script or editing rc.conf. I'm just wondering if there is anything built into RCng for this situation. Please CC: me as I'm not sub'd to [EMAIL PROTECTED] -- Freddie Cash [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Manually starting RCng scripts disabled in rc.conf
On May 17, 2004, at 11:53 AM, Freddie Cash wrote: RCng scripts require an entry in /etc/rc.conf along the lines of appname_enable=YES otherwise the script will fail to do anything. As an aside, you may want to use /etc/rc.conf.local instead. on a related note: One problem is that it appears that /usr/local/etc/rc.d is NOT a full-citizen in the rcNG system. You must have a .sh on the end, which is not true of things in /etc/rc.d . I do not know if this means that /usr/local/etc/rc.d scripts run inside the main process as a .sh script does from /etc/rc.d or if it runs as a sub-process. In /etc/rc.d, ones without .sh run as sub-processes of the main startup script, while ones ending with .sh run in the main process... Chad ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
[OT]Re: Manually starting RCng scripts disabled in rc.conf
On Mon, 17 May 2004 12:30:32 -0600 Chad Leigh -- Shire.Net LLC [EMAIL PROTECTED] wrote: On May 17, 2004, at 11:53 AM, Freddie Cash wrote: RCng scripts require an entry in /etc/rc.conf along the lines of appname_enable=YES otherwise the script will fail to do anything. As an aside, you may want to use /etc/rc.conf.local instead. on a related note: One problem is that it appears that /usr/local/etc/rc.d is NOT a full-citizen in the rcNG system. You must have a .sh on the end, which is not true of things in /etc/rc.d . I do not know if this means that /usr/local/etc/rc.d scripts run inside the main process as a .sh script does from /etc/rc.d or if it runs as a sub-process. In /etc/rc.d, ones without .sh run as sub-processes of the main startup script, while ones ending with .sh run in the main process... Chad ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] Slightly off topic, but is there any documentation for RCng? The 'examples' in [/usr/local]/etc/rc.d are not very self-explanatory. -- Cogeco ergo sum pgpsQJuZnZpDC.pgp Description: PGP signature