Executus

TODO: Add description

Installation

If available in Hex, the package can be installed by adding executus to your list of dependencies in mix.exs:

def deps do
  [
    {:executus, "~> 0.3.1"}
  ]
end

Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/executus.

Running as root

Executus can be configure to run root commands using sudo by adding a configuration for Erlexec to the config.exs file. See http://saleyn.github.io/erlexec/ for all Erlexec config and command options.

use Mix.Config

config :erlexec, limit_users: ['some_list_of_users_who_can_run_commands']
config :erlexec, root: true
config :erlexec, user: 'user_who_will_run_sudo_commands'

You will also need to update your sudoers file to set NOPASSWD for running the exec-port program found in your projects _build/dev/lib/erlexec/priv/*/ folder and set the SUID bit of the exec-port program.