This is a module for MagicMirror².
Checks the configuration for modules that are used, not but installed.
Missing modules are fetched from the configured repository and npm install
is run afterwards.
To install the module, just clone this repository to your modules folder:
git clone https://github.com/qistoph/MMM-autoinstall.git autoinstall
.
Then run cd autoinstall
and npm install
to install the dependencies.
This module should be loaded before any modules with a repository URL. Preferably configure this module first in your config:
modules: [
{
module: 'autoinstall'
},
]
Modules that should be automatically installed need to have a repository set. E.g.
modules: [
{
module: 'nstreinen',
repository: 'https://www.github.com/qistoph/MMM-nstreinen',
config: {
...
}
}
]
If only default modules or modules with a repository configured are used, you now only have to copy your config.js to a new system (e.g. from your dev/test to your actual mirror) and all modules will automatically be installed.
The default module updatenotifier will let you know when updates are available.
You can use autoinstall
to install available updates for your modules that
have a repository defined. This is not automatically done on startup, because it
slows down the initialization of your mirror.
To check for updates and install them, run this in your MagicMirror² directory:
nodejs modules/autoinstall/update.js