WebSocketGaugeServer - Program startup
Run from binary executable
- Download binary archive and extract it.
- Edits setting file of
appsettings.json.- See Configure.md.
- Run executable file of
WebSocketServer(orWebSocketServer.exein Windows). - To stop the server, type Ctrl+C.
Run automatically on linux boot (by systemd)
systemd of linux can run WebSocketServer program at OS startup like daemon.
- Copy all of executable asset files to
/opt/websocketgaugeserver - Add follwing file of
websocketgaugeserver.serviceto/etc/systemd/system/``` [Unit] Description=WebsocketGaugeServer
[Service] Type=simple ExecStart=/opt/websocketgaugeserver/WebSocketServer WorkingDirectory=/opt/websocketgaugeserver KillMode=process Restart=always
[Install] WantedBy=multi-user.target
3. Set `websocketgaugeserver.service` to enable, to run automatically.
sudo systemctl enable websocketgaugeserver.service
4. After system reboot, you can check the status of `websocketgaugeserver.service` by
journalctl -xeu websocketgaugeserver.service ```
- To disable autorun and uninstall..
- Run
sudo systemctl disable websocketgaugeserver.service - Remove
/etc/systemd/system/websocketgaugeserver.service - Delete
/opt/websocketgaugeserver
- Run
Run by making Docker container
- Move the directory of
Docker.image.install(of the source code) - Edits setting file of
appsettings.json.- See Configure.md.
- Get docker image from dockerhub, and write appsettings.json to the image.
- See Setup-Docker.md for detail.
- Run docker image by creating container.
- To use only “virtual ecu mode” (not communicate with ECU or sensor),
docker run -p 2016:2016 --name wsgaugeserver local/wsgaugeserver- Change port number of
-poption, if you change port number byappsettings.json - Replace
local/wsgaugeserverwith the image tag name you created in 3. - Set your favorite container name by
--nameoption.
- Change port number of
- To communicate with ECU, Seosor, scantool, you have to export the device to Docker container by adding
--deviceoption.docker run -p 2016:2016 --name wsgaugeserver --device=/dev/ttyUSB0 local/wsgaugeserver- See this document
- To run the container automatically on system bootup, set restart policy by
--restartoptiondocker run -p 2016:2016 --name wsgaugeserver --device=/dev/ttyUSB0 --restart always local/wsgaugeserver- See this document
- To use only “virtual ecu mode” (not communicate with ECU or sensor),