Hello.
I use apache13 port. When I need to restart it, I use /usr/local/etc/rc.d/apache.sh restart.
I have some scripts to create websites (install apache vhosts in a directory, for example). And I need to restart Apache automatically in this script, without print outputs (except errors).
However, I always have outputs:
(I remplaced site names by http://www.site.net)
As you can see, I have many vhosts files. And I want to mask these ouputs (only show errors). I made a apachectl configtest before for don't restart Apache if errors where found.
When I append a > /dev/null at /usr/local/etc/rc.d/apache.sh restart, these outpurs appears. If I append a 2> /dev/null, too.
I do not have this 'problem' with /etc/rc.d/named restart > /dev/null. Only with apache13 port rc script.
Do you have any ideas?
Thanks a lot.
Regards,
I use apache13 port. When I need to restart it, I use /usr/local/etc/rc.d/apache.sh restart.
I have some scripts to create websites (install apache vhosts in a directory, for example). And I need to restart Apache automatically in this script, without print outputs (except errors).
However, I always have outputs:
Code:
/usr/local/etc/rc.d/apache.sh restart 2> /dev/null
Processing config directory: /usr/local/etc/apache/apps/
Processing config file: /usr/local/etc/apache/apps/mysql
Processing config file: /usr/local/etc/apache/apps/stat
Processing config directory: /usr/local/etc/apache/sites/
Processing config file: /usr/local/etc/apache/sites/www.site.net
Processing config file: /usr/local/etc/apache/sites/www.site.net
Processing config file: /usr/local/etc/apache/sites/www.site.net
Processing config file: /usr/local/etc/apache/sites/wwww.site.net
Processing config file: /usr/local/etc/apache/sites/www.site.net
Processing config file: /usr/local/etc/apache/sites/www.site.net
Processing config file: /usr/local/etc/apache/sites/www.site.net
Processing config file: /usr/local/etc/apache/sites/www.site.net
Processing config file: /usr/local/etc/apache/sites/www.site.net
Processing config file: /usr/local/etc/apache/sites/www.site.net
Processing config file: /usr/local/etc/apache/sites/www.site.net
Processing config file: /usr/local/etc/apache/sites/www.site.net
Processing config file: /usr/local/etc/apache/sites/www.site.net
Processing config file: /usr/local/etc/apache/sites/www.site.net
Processing config file: /usr/local/etc/apache/sites/www.site.net
Processing config file: /usr/local/etc/apache/sites/www.site.net
Processing config file: /usr/local/etc/apache/sites/www.site.net
Processing config file: /usr/local/etc/apache/sites/www.site.net
Processing config file: /usr/local/etc/apache/sites/www.site.net
Processing config file: /usr/local/etc/apache/sites/www.site.net
Processing config file: /usr/local/etc/apache/sites/www.site.net
Processing config file: /usr/local/etc/apache/sites/www.site.net
Processing config file: /usr/local/etc/apache/sites/www.site.net
Processing config file: /usr/local/etc/apache/sites/www.site.net
Processing config file: /usr/local/etc/apache/sites/www.site.net
Processing config file: /usr/local/etc/apache/sites/www.site.net
Processing config file: /usr/local/etc/apache/sites/www.site.net
Processing config file: /usr/local/etc/apache/sites/www.site.net
Processing config file: /usr/local/etc/apache/sites/www.site.net
Processing config file: /usr/local/etc/apache/sites/www.site.net
Processing config file: /usr/local/etc/apache/sites/www.site.net
Processing config file: /usr/local/etc/apache/sites/www.site.net
Processing config file: /usr/local/etc/apache/sites/www.site.net
Processing config file: /usr/local/etc/apache/sites/www.site.net
Processing config file: /usr/local/etc/apache/sites/www.site.net
Processing config file: /usr/local/etc/apache/sites/www.site.net
Processing config file: /usr/local/etc/apache/sites/www.site.net
Processing config file: /usr/local/etc/apache/sites/www.site.net
Processing config directory: /usr/local/etc/apache/ssl/
Processing config file: /usr/local/etc/apache/ssl//www.site.net
Processing config directory: /usr/local/etc/apache/domains_save/
Processing config directory: /usr/local/etc/apache/domains_temp/
Processing config file: /usr/local/etc/apache/domains_temp/www.site.net
Processing config file: /usr/local/etc/apache/domains_temp/www.site.net
Processing config file: /usr/local/etc/apache/domains_temp/www.site.net
Processing config file: /usr/local/etc/apache/domains_temp/www.site.net
Processing config file: /usr/local/etc/apache/domains_temp/www.site.net
Processing config file: /usr/local/etc/apache/domains_temp/www.site.net
(I remplaced site names by http://www.site.net)
As you can see, I have many vhosts files. And I want to mask these ouputs (only show errors). I made a apachectl configtest before for don't restart Apache if errors where found.
When I append a > /dev/null at /usr/local/etc/rc.d/apache.sh restart, these outpurs appears. If I append a 2> /dev/null, too.
I do not have this 'problem' with /etc/rc.d/named restart > /dev/null. Only with apache13 port rc script.
Do you have any ideas?
Thanks a lot.
Regards,