Skip to content

Sudo Required for Plugin Self Update #6

Description

@vjkoskela

The mcsmqtt plugin supports install beta versions from within the Homeseer. However, this functionality requires root permissions, and consequently, the plugin invokes the plugin update process using sudo. The exact command is:

sudo mono /homeseer/bin/mcsMQTT/UPDATEPLUGIN.exe HS4 HSPI_MCSMQTT

Unfortunately, this fails when running Homeseer within Docker because the image does not contain the sudo command. However, since Homeseer runs as root within the container, all we really need is an executable script that acts like sudo.

For example:

#!/bin/sh
timestamp=$(date "+%Y%m%d_%H%M%S")
echo "[$timestamp] Running: $@" >> /var/tmp/sudo.log
exec $@

(it must be made executable of course: chmod +x /usr/bin/sudo)

I've tested this out and it works great!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions