Read the statement by Michael Teeuw here.
Create another config.js file
-
Hi, so for a project that I’m working on, I want to create multiple config.js files and name them like config1.js, config2.js and etc. But in order to open on of them (so like the config2.js for example) while booting the MagicMirror, I need to change the path or the configuration that defaults it to config.js. Does anyone know how I can do that?
-
@BigMan I would create different scripts, and copy your specific config.js into the config folder as config.js.
-
@sdetweil can you please elaborate more on your response. If you can, with examples too. Thanks!
-
@BigMan create a folder called ~/MagicMirror/myConfigs
place you config1, config2 … confign…js in thereMM starts with a script installers/mm.sh (or u can create your own)
anyhow…
lets create run1.sh in installers
#!/bin/bash # copy my config.js into the folder with the required name cp ~/MagicMirror/myConfigs/config1.js ~/MagicMirror/config/config.js # then call mm.sh exec ~/MagicMirror/installers/mm.shthen after saving, do
chmod +x run1.shthen whenever u want to run MM with config1
just do
~/MagicMirror/installers/run1.shu can shorten the commands if u are in the MagicMirror folder at the time…
create as many run?.sh as u need
I might save the original config.js in your folder too
-
-
@BigMan said in Create another config.js file:
even easier!
put all your configs into the config folder
then just set which on to use#!/bin/bash # set my config export MM_CONFIG_FILE=~/MagicMirror/config/config1.js # then call mm.sh exec ~/MagicMirror/installers/mm.shthanks @strawberry-3-141
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login