Hi, I am working in a project where the main emonCMS user has no access to the server command line. Therefore every time I change something we need to ask the system administrator to login and manually pull everything.
The aim of the module is to provide a user interface for administrators to update emonCMS, modules and themes.
Only items installed with git can be updated.
Notes:
If emonCMSā default settings file has been modified, a message is shown to the user asking to do the update manually and copy over the settings
If the shema file of a module has changed, a message is shown to the user to remind that database update is required
emonCMS will check if there are updates available everytime a page is loaded and show a message if there are updates available. The user only needs to close the message once per session
Itās very likely that the user will have permissions problems when updating an item. When installing via git on the command line the user is probably different than the one used by Apache. In this case a message is shown to the user with instructions about how to change the owner of the files. Typical fix would be to run in the command line sudo chown -R www-data:www-data your_emonCMS_path. This assumes you apache user is www-data
Yes, I have thought about the pull request but I wanted to wait for somebody else to try it and be sure that it is working as expected and not buggy. Once we know it doesnāt break Iāll do the pull request.
I have been thinking more on this and before requesting the pull I think the permissions issue I say in the notes should be sorted.
What I have done in my installation: I originally changed the user and group to www-data but that was super annoying as I couldnāt install anything from the command line or change any file. So I had to change the owner again to myself and leave the group as www-data, then I made every file writable for the group. This way the Updates module (which runs as www-data) can modify the files. But I donāt like the idea of making everything writable for the group. Also the idea of the module is to make life easier and by this I mean to avoid asking the user to go to the command line and fiddle with users and permissions.
One solution I am thinking is to add an āInstallā functionality. Once a module has been installed through the user interface, the files owner will be www-data and there will not be the need of changing owner or permissions. Only problem with this is that we will only be able to update modules and themes that have been installed via the user interface, while it will not be possible to update the emonCMS core files (including its module and basic theme)
Agree, this would be a really nice addition to Emoncms. Especially if Modules could be installed and individually updated through the user interface. It would be really great if Emoncms would notify the user when an update was available. A further extension of this would be to give the user a choice of branch e.g. Either āstableā or āmasterā.
@cagabi - I have been working on some related stuff, rather than over-whelm your thread with my ideaās, I have started another thread and would be interested in any comments you might have,
It would be a start to have a list of current modules in the Guide rather than rooting through pages of old GitHub repos trying to find the right module