Project

General

Profile

Actions

Bug #999

closed

vhosts does not show up as started

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

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
vhosts
Target version:
-
Start date:
11/07/2010
Due date:
% Done:

0%

Estimated time:
Plus Target Version:
Affected Version:
Affected Plus Version:
Affected Architecture:

Description

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.

Actions #1

Updated by Net Vicious over 11 years ago

Hi!

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).

Regards,

Actions #2

Updated by Robert Middleswarth about 11 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.

Actions #3

Updated by Reiner Keller about 11 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 ?

Actions #4

Updated by Chris Buechler about 10 years ago

  • Category set to vhosts
  • Affected Version deleted (2.0)
Actions #6

Updated by Chris Buechler over 9 years ago

  • Status changed from New to Resolved
Actions #7

Updated by Kirk McCann over 9 years ago

This is still an issue in the current release

Actions #8

Updated by Kill Bill over 9 years ago

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

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

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

Actions

Also available in: Atom PDF