Bug #999
closedvhosts does not show up as started
0%
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.
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,
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.
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@pfsense.local]/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@pfsense.local]/root(24): ps axwu | grep '\b/var/etc/vhosts-http.conf\b' | grep -v 'grep'
[2.1-RELEASE][root@pfsense.local]/root(25): ps axwu | grep '\b/var/etc/vhosts-http.conf\b' | grep -v 'grep'
[2.1-RELEASE][root@pfsense.local]/root(26): ps axwu | grep '\b/var/etc/vhosts-http\b' | grep -v 'grep'
[2.1-RELEASE][root@pfsense.local]/root(27): ps axwu | grep '\b/var/etc/vhosts-http' | grep -v 'grep'
[2.1-RELEASE][root@pfsense.local]/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 ?
Updated by Chris Buechler about 10 years ago
- Category set to vhosts
- Affected Version deleted (
2.0)
Updated by Kill Bill over 9 years ago
Updated by Kirk McCann over 9 years ago
This is still an issue in the current release
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.