Project

General

Profile

Actions

Bug #637

closed

Nothing starts imrest at boot

Added by Hammel over 5 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Immediate
Assignee:
Category:
Software
Target version:
Start date:
05 Jul 2018
Due date:
% Done:

100%

Estimated time:
Severity:
01 - Critical

Description

If we're in Pair Mode at power-up then S90imwww starts the php server for configuration. However, if we're not in Pair Mode then imrest should be started with NodeJS. But nothing is doing that right now.

The S90imwww script needs to support the imrest startup and shutdown. This means that runserver.sh should include an imrest mode that daemonizes the NodeJS server and stores its PID so the init script, via runserver.sh, can shut it down gracefully too.

Actions #1

Updated by Hammel over 5 years ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 10

This requires changing the context of the Pair Mode button on the Pi. It now has to operate in dual modes just it does on the IoT device.

  • If set at boot, we're in Config Mode. In this case start the PHP server to configure the monitor.
  • If not set at boot, we're in Operational Mode. In this case start the NodeJS server.
  • If set after boot, we're in Pair Mode. The NodeJS server must query this when receiving pair-related requests. This implies synchronously calling imgpio directly from NodeJS.
This work implies changes to the following.
  • S90imwww: Needs to know which server to start. Needs to be able to stop either server via runserver.sh.
  • runserver.sh: Needs to know how to start NodeJS server. Needs to know how to stop both servers.

Note that pair.js in imrest already uses imgpio, via init.js, to check if pair mode is enabled.

Actions #2

Updated by Hammel over 5 years ago

  • % Done changed from 10 to 20

Code is implemented in my sandbox but needs testing on real hardware.

Actions #3

Updated by Hammel over 5 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 20 to 100

Verified working in latest commits.

Commits have been pushed.

Closing issue.

Actions

Also available in: Atom PDF