mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-12-12 09:52:37 +00:00
Added my (modified) updater main core into updatenotification default
module
Missing: callback display in MM² (i will code it after)
new part of configuration added:
```
updates: [
// array of module update commands
{
// with embed npm script
"MMM-Test": "npm run update"
},
{
// with "complex" process
"MMM-OtherSample": "rm -rf package-lock.json && git reset --hard && git pull && npm install"
},
{
// with git pull && npm install
"MMM-OtherSample2": "git pull && npm install"
},
{
// with a simple git pull
"MMM-OtherSample3": "git pull"
}
],
updateTimeout: 2 * 60 * 1000, // max update duration
updateAutorestart: false // autoRestart MM when update done ?
```
@khassel: i need your help
I don't use docker, maybe you can help me for this:
How can i check if MM² is running inside a docker ? (from MM² main core)
Actually, I check if we use pm2 or not.
I have to check if docker is used or not too
last time you tell me: "you can't use updater with docker", so I want to
check and deny any update if docker used
---------
Co-authored-by: bugsounet <bugsounet@bugsounet.fr>
42 lines
1.7 KiB
Plaintext
42 lines
1.7 KiB
Plaintext
{% if not suspended %}
|
|
{% if needRestart %}
|
|
<div class="small bright">
|
|
<i class="fas fa-rotate"></i>
|
|
<span>
|
|
{% set restartTextLabel = "UPDATE_NOTIFICATION_NEED-RESTART" %}
|
|
{{ restartTextLabel | translate() | safe }}
|
|
</span>
|
|
</div>
|
|
{% endif %}
|
|
{% for name, status in moduleList %}
|
|
<div class="small bright">
|
|
<i class="fas fa-exclamation-circle"></i>
|
|
<span>
|
|
{% set mainTextLabel = "UPDATE_NOTIFICATION" if name === "MagicMirror" else "UPDATE_NOTIFICATION_MODULE" %}
|
|
{{ mainTextLabel | translate({MODULE_NAME: name}) }}
|
|
</span>
|
|
</div>
|
|
<div class="xsmall dimmed">
|
|
{% set subTextLabel = "UPDATE_INFO_SINGLE" if status.behind === 1 else "UPDATE_INFO_MULTIPLE" %}
|
|
{{ subTextLabel | translate({COMMIT_COUNT: status.behind, BRANCH_NAME: status.current}) | diffLink(status) | safe }}
|
|
</div>
|
|
{% endfor %}
|
|
{% for name, status in updatesList %}
|
|
<div class="small bright">
|
|
{% if status.done %}
|
|
<i class="fas fa-check" style="color: lightgreen;"></i>
|
|
<span>
|
|
{% set updateTextLabel = "UPDATE_NOTIFICATION_DONE" %}
|
|
{{ updateTextLabel | translate({MODULE_NAME: name}) | safe }}
|
|
</span>
|
|
{% else %}
|
|
<i class="fas fa-xmark" style="color: red;"></i>
|
|
<span>
|
|
{% set updateTextLabel = "UPDATE_NOTIFICATION_ERROR" %}
|
|
{{ updateTextLabel | translate({MODULE_NAME: name}) | safe }}
|
|
</span>
|
|
{% endif %}
|
|
</div>
|
|
{% endfor %}
|
|
{% endif %}
|