Closed PLanB2008 closed 2 years ago
I'll look into this myself :)
Created a pull request.
Can you have a look if this is suitable? Fix setup.ini access #199
Hello @PLanB2008
Thanks for the fix ! The way I did this never convince me, and I'm asking myself if it's not better to load the setup at the start of the webui ( without sensible data ) and to have it available the whole life cycle, like the lmconfig :
So the try..except
block would only be needed in lmn_common/api.py as you did.
The reason is : I need some informations from setup.ini
in other plugins and I don't like the idea to read it again and again.
When the setup wizard is launched, the webui is then restarted and would at this point load the content of setup.ini
.
What do you think about this ?
I have tested on a newly installed system with linuxmuster-prepare for 71. A I tried to run the setup via webui, I reveived an error.
As I ran
touch /var/lib/linuxmuster/setup.ini systemctl restart linuxmuster-webui.service
I was able to login to WebUI.
Additional problem:
Having logged in as root, there is no button to start LM Setup Wizard.
When I use http://10.0.0.1/view/lm/init/welcome
the setup wizard starts.
To be fixed for productive use.
Solved by @PLanB2008
There are some plugins in lmn71 branch which depends on reading the setup.ini.
This is a problem during the initial setup process. The setup wizard looks for this file and if its not available the setup wizard start. Right now ajenti cannot start at all because the lmn_common module fails to load because of the missing setup.ini file.