Skip to content

E3 - Autorun

To allow the automatic start of the web control interface, I use the system manager systemd.

E³-WebUI run on system boot

Below I describe the steps to follow to activate the autorun at boot.
Read the instructions to the end before proceeding.

  1. Copy unit file engravecube.service in system directory /etc/systemd/system/
     sudo cp engravecube.service /etc/systemd/system/
    
  2. Make unit file runnable
    chmod 777 /etc/systemd/system/engravecube.service
    
  3. Enable the autorun E³-WebUI such as system service.
    sudo systemctl enable engravecube
    

If all has been done correctly the E³-WebUI will be started as a service and automatically restarted at each reboot.

Note_1

The engravecube.service unit file was prepared with the idea that the E³-WebUI application is placed (along with the E³-Sender and E³-PostProcessor) in the /usr/bin/engraveCube/ directory. See the installation guide for more details.

Note_2

~~ The unit file engravecube.service was prepared with the idea that the E³-WebUI application is performed as User pi1 (User=pi Group=pi).~~

Start/Stop/Restart E³ control service

Once the system manager Systemd has been configured, the web control interface will be automatically started at boot time. However, I can check the execution of the service through the service utility.

To manually start the E³-WebUI service I use the command

sudo service engravecube start

To stop the E³-WebUI service I use the command

sudo service engravecube stop

To restart the E³-WebUI service I use the command

sudo service engravecube restart

To know the E³-WebUI service status I use the command

sudo service engravecube status

To disable the service so that it is no longer automatically run at boot

sudo systemctl disable engravecube

Edit unit file.

In case of modification to the unit file you need to update the Systemd system manager configuration through the command:

sudo systemctl daemon-reload

  1. ~~Run WebUi as pi to remedy the incorrect installation of python dependencies (see requirements.txt file) that have been installed in the user’s home-directory instead of globally to all users.~~ Problem solved by logging in as root (sudo su) and going to manually installpip install <package>the missing packages (Flask-WTF