Vhosts-http - service status not updated when running

  • vhosts-http service always shown as not running in pfSense webGUI, even when it actually is running.

    in /etc/inc/service-utils.inc:  function get_service_status($service)
    there seems to be missing this case statement:

    case "vhosts-http":
                            $running = is_pid_running("{$g['varrun_path']}/vhosts-http.pid");

    inserting the above 3 lines at line 409 fixes the problem.
    unfortunately, the file gets overwritten on every snapshot update and the edit has to be put back.

  • Pushed the commit.

  • thanks, I look out for it in snapshots.

  • I see it now in snapshot and it works, but there is another problem;

    After installing latest snapshot and reboot, Status: services still shows vhosts as stopped, but actually it is running;

    [2.1-BETA1][root@pfsense.localdomain]/root(14): ps -ax | grep vhost
    97972  ??  SN    0:00.07 /usr/local/sbin/lighttpd -f /var/etc/vhosts-http.conf
    26964  0  S+    0:00.00 grep vhost
    [2.1-BETA1][root@pfsense.localdomain]/root(15): ls -l /var/run/vh*
    -rw-r–r--  1 root  wheel  0 May  1 22:39 /var/run/vhosts-http.pid

    the /var/run/vhosts-http.pid file is empty.
    if I put the PID "97972" into that file, then check the Status: services, it now shows running.

    The problem appears that the PID is not being saved into the PID file upon startup.

Log in to reply