linuxmuster / linuxmuster-webui7

Next generation web interface for linuxmuster.net v7.
https://www.linuxmuster.net
GNU General Public License v3.0
12 stars 8 forks source link

setup.ini not Found #198

Closed PLanB2008 closed 2 years ago

PLanB2008 commented 3 years ago

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.

PLanB2008 commented 3 years ago

I'll look into this myself :)

PLanB2008 commented 3 years ago

Created a pull request.

Can you have a look if this is suitable? Fix setup.ini access #199

kiarn commented 3 years ago

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 :

https://github.com/linuxmuster/linuxmuster-webui7/blob/661ea1a9fa10737a11de537f3bc6b2b33a0efac3/usr/lib/linuxmuster-webui/plugins/lmn_common/api.py#L48

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 ?

cweikl commented 2 years ago

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.

kiarn commented 2 years ago

Solved by @PLanB2008