Skip to content

Emonhub.conf is not always imported correctly #67

@borpin

Description

@borpin

backup/usb-import.sh

Lines 217 to 227 in 9cfc5b8

# Copy emonhub conf
# ---------------------------------------------------------------
# New structure
if [ -f /media/old_sd_root/etc/emonhub/emonhub.conf ]; then
sudo cp -fv /media/old_sd_root/etc/emonhub/emonhub.conf $emonhub_config_path/emonhub.conf
fi
# Old structure
if [ -f /media/old_sd_data/emonhub.conf ]; then
sudo cp -fv /media/old_sd_data/emonhub.conf $emonhub_config_path/emonhub.conf
fi
# ---------------------------------------------------------------

From a number of queries in the community, I suspect that emonhub.conf i not always imported correctly.

Because there are 2 ifs it is possible that the one in use, could be overwritten by a very old version.

Compress to a single if and save the default version. Bias towards the new structure configuration

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions