thiagoralves / OpenPLC_v3

OpenPLC Runtime version 3
GNU General Public License v3.0
1.11k stars 452 forks source link

Re-running `./install.sh` after deleting `blank_program.st` breaks webserver #231

Open Chrismettal opened 8 months ago

Chrismettal commented 8 months ago

Description

It seems that ./install.sh always enforces the blank project to be started, but it doesn't ensure that this project is actually still present. After deleting the blank project and running ./install.sh again will result in the webserver not starting up anymore.

Restoring openplc.db with git checkout HEAD -- webserver/openplc.db will make the system run again, though this will reset the user's settings, which is a pain when you have to enter slave device information again.

Steps to reproduce

Have a working OpenPLC install running a sample project:

image

Delete the unused Blank project:

image

Re-run ./install.sh (for example after git pull to update your runtime)

image

Attempt to start runtime (after rebooting):

image