View Source nerves_motd

Hex version CircleCI

nerves_motd prints a "message of the day" on Nerves devices.

usage

Usage

Just invoke NervesMOTD.print/1 in rootfs_overlay/etc/iex.exs of your Nerves projects.

NervesMOTD.print()

By default, NervesMOTD.print/1 prints Nerves logo, but you can replace it with your custom logo if you wish.

NervesMOTD.print(
  logo: """
  My custom logo
  """
)

You can append your custom rows by passing the :extra_rows parameter to NervesMOTD.print/1.

NervesMOTD.print(
  extra_rows: [
    [{"Label", "value"}, {"Label2", "value2"}],
    [{"Long label", "Lots of text"}]
  ]
)

installation

Installation

Install by adding :nerves_motd to your list of dependencies in mix.exs:

def deps do
  [
    {:nerves_motd, "~> 0.1.0"}
  ]
end

For details, see API reference.

license

License

Copyright (C) 2022 Masatoshi Nishiguchi, Nerves Project Authors

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at [http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0)

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.