Bug #999

vhosts does not show up as started

Added by Moshe Katz about 9 years ago. Updated over 4 years ago.

Target version:
Start date:
Due date:
% Done:


Estimated time:
Affected Version:
Affected Architecture:


In pfSense 1.x, checking whether a service was started was done using ps axwu | grep '\b{$process}\b' | grep -v 'grep'.
In 2.0, this checking is done using pgrep -x {$process}.

The vhosts package uses the same executable name as the webconfigurator so it checks whether it is running by using "vhosts-http" (the config file name) as $process. That works in the old way because the config file shows up in the ps listing.

However, pgrep only checks the program names so the vhosts service always appears stopped in the services manager.


#1 Updated by Net Vicious over 6 years ago


Could you tell us how to fix it.

I think two years it's so much time to fix this little problem (talking about the modifications it needs to fix it).


#2 Updated by Robert Middleswarth about 6 years ago

I can confirm this is still an issue with the package. It seems to work outside the fact there is no way to know if the service is actually running or not.

#3 Updated by Reiner Keller about 6 years ago

looks a little weird... it seems that \b...\b didn't match the old way:

[2.1-RELEASE][]/root(23): ps axwu | grep '\blighttpd\b' | grep -v 'grep'
root 2489 0.0 0.4 26268 6872 ?? S Tue08AM 0:12.85 /usr/local/sbin/lighttpd -f /var/etc/lighty-webConfigurator.conf
root 16993 0.0 0.2 20996 3872 ?? S Tue08AM 0:01.27 /usr/local/sbin/lighttpd -f /var/etc/vhosts-http.conf
[2.1-RELEASE][]/root(24): ps axwu | grep '\b/var/etc/vhosts-http.conf\b' | grep -v 'grep'
[2.1-RELEASE][]/root(25): ps axwu | grep '\b/var/etc/vhosts-http.conf\b' | grep -v 'grep'
[2.1-RELEASE][]/root(26): ps axwu | grep '\b/var/etc/vhosts-http\b' | grep -v 'grep'
[2.1-RELEASE][]/root(27): ps axwu | grep '\b/var/etc/vhosts-http' | grep -v 'grep'
[2.1-RELEASE][]/root(28): ps axwu | grep '/var/etc/vhosts-http' | grep -v 'grep'
root 16993 0.0 0.2 20996 3872 ?? S Tue08AM 0:01.27 /usr/local/sbin/lighttpd -f /var/etc/vhosts-http.conf

perhaps you can match it on config file without \b\b ?

#4 Updated by Chris Buechler about 5 years ago

  • Category set to vhosts
  • Affected Version deleted (2.0)
  • Affected Documentation 0 added

#6 Updated by Chris Buechler over 4 years ago

  • Status changed from New to Resolved

#7 Updated by Kirk McCann over 4 years ago

This is still an issue in the current release

#8 Updated by Kill Bill over 4 years ago

Yeah, I won't be hardlinking lighttpd for every vhost, sorry; pgrep -anf is supposed to match this:

Match against full argument lists. The default is to match against process names.

If it doesn't, then it's broken.

Also available in: Atom PDF