sdetweil / MMM-Config

testing
30 stars 3 forks source link

Suggestion - Restart? #21

Closed BKeyport closed 3 years ago

BKeyport commented 3 years ago

Would it be possible to optionally restart upon saving config? I'm assuming the hard part would be determining how user started MM - PM2/Docker/or raw.

Two buttons, [save and restart] [save only]

Just a thought.

sdetweil commented 3 years ago

set the existing restart config option

sdetweil commented 3 years ago

I don't know how to restart docker instance, but could do it.

BKeyport commented 3 years ago

I'm not finding a restart option anywhere, this is why I suggested.

sdetweil commented 3 years ago

in my module options showQR forceupdate restart debug

and in my doc

BKeyport commented 3 years ago

Ahh, I see it. I was looking for a checkbox, and it's a text field.

BKeyport commented 3 years ago

Not clear, do I need "PM2:mm" or just "mm"?

sdetweil commented 3 years ago

pm2:mm

BKeyport commented 3 years ago

OK, Thanks.

sdetweil commented 3 years ago

I had thought about auto detecting the pm2 instance. then it could be a dropdown

BKeyport commented 3 years ago

Actually, I think that would be best reconfigured - maybe set it up to be "command to restart MM"

So, the Pm2 user would be "pm2 restart MagicMirror" (by your script), or "pm2 restart mm" on my system.

sdetweil commented 3 years ago

but I can figure it out. pm2 info will give me the paths, and I know which one we are running on. I don't need the name. I can use the number

BKeyport commented 3 years ago

Okay. I'll shaddup and let you work. :)

Back to work on my test box..

sdetweil commented 3 years ago

pushed update to address this

BKeyport commented 3 years ago

Works.