Since @xPaw provided a really nice way to watch user config files, there is now no need to be cheap about it (it used to be run every second, possibly why it could be disabled via settings?).
This commit also improves the function a little bit by making use of ES6 syntax.
A warning gets displayed on the server console when the `autoload` option is still present in the config file.
Several ES6 additions are only available in strict mode. Example:
> SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
Strict mode was also enabled in a few of our files already, and it is a good thing to have anyway.
After some testing and manually trying to set sane file modes, it turns out the umask still applies. So it seems the logical way to handle this is to actually rely on the OS umask to set proper permissions.
- refactor clientManager.js to allow configuration parsing as a serparate
function.
- refactor clientManager.js to add configuration writing function.
- add server.js changes to allow for new password-change functionality
- add password change ui to "settings" screen
- refactor client.js to use new clientManager functionality for saving
the configuration files
Autoload now uses kernel events to watch files on disk. This greatly increases performance and reliability. Autoload will also watch user.json files for changes and reload the users data.
Listens for a 'SIGHUP' signal and reloads users when it gets one. The signal won't be listened to if its running on Windows as a SIGHUP indicates a console window closing.