Skip to content
This repository has been archived by the owner on Jun 20, 2018. It is now read-only.

Latest commit

 

History

History
60 lines (42 loc) · 1.03 KB

script-design.md

File metadata and controls

60 lines (42 loc) · 1.03 KB

Script design

3 necessary scripts

  • Setup WiFi: ./config-wifi
  • Setup Jetty: ./install-jetty
  • Deploy Web app: ./install-app

Usages

Setup WiFi

  • Initialize WiFi interface
  • Ask users to input WiFi credential (SSID and password)
  • Connect WiFi
  • Check whether it is successful of not
  • Allow users to restart WiFi

Functions

  • Initialize WiFi interface
$sudo ./config-wifi init
  • Setup WiFi
$sudo ./config-wifi setup
  • Restart WiFi
$sudo ./config-wifi restart

Setup Jetty server

  • Check Java 8 availability and download it if it is not installed yet
  • Download and install Jetty server
  • Put it as a service
  • Set the service automatically runs every time Raspberry Pi is powered on
$sudo ./install-jetty

Deploy AromaController app

  • Download the latest AromaController app (.war file)
  • Put it inside Jetty's folder where it is defined by Jetty itself
  • Restart Jetty to make new .war file loaded
  • Check if it runs correctly
  • Show message
$sudo ./install-app