After seeing a update message, I thought about updating my container and checked your repo first to see if it handled updating the default modules.
Looking at this script, you are checking if /opt/magic_mirror/modules is a regular file, not a directory
https://github.com/bastilimbach/docker-MagicMirror/blob/0d92ce00bbf014606ebf784bdf77a52c5124ef62/docker-entrypoint.sh#L3
This means every time the entry script is invoked it will copy over everything from /opt/default_modules/. This also does not account for files that are not present anymore in the defaults
I forked your repo to see if I could come up with a way of solving the issue, so far i have changed the check to see if the /opt/magic_mirror/modules/default folder exists and move all my modules in a sub folder, but that makes adding modules also more complicated, requiring the subdir in the name or compiling a js file that defines all modules like the default folder has (this would involve making a script to compile this file each boot).
Another idea was to store and check for a version file in the module directory to see if it needs updating.
What do you think would be a good idea to go about solving this?
After seeing a update message, I thought about updating my container and checked your repo first to see if it handled updating the default modules. Looking at this script, you are checking if
/opt/magic_mirror/modules
is a regular file, not a directory https://github.com/bastilimbach/docker-MagicMirror/blob/0d92ce00bbf014606ebf784bdf77a52c5124ef62/docker-entrypoint.sh#L3 This means every time the entry script is invoked it will copy over everything from/opt/default_modules/
. This also does not account for files that are not present anymore in the defaultsI forked your repo to see if I could come up with a way of solving the issue, so far i have changed the check to see if the
/opt/magic_mirror/modules/default
folder exists and move all my modules in a sub folder, but that makes adding modules also more complicated, requiring the subdir in the name or compiling a js file that defines all modules like the default folder has (this would involve making a script to compile this file each boot).Another idea was to store and check for a version file in the module directory to see if it needs updating.
What do you think would be a good idea to go about solving this?