Skip to content

motd

Overview

motd is a Saltbox module that enhances the Message of the Day (MOTD) displayed upon user login to provide Saltbox-managed information.


Deployment

sb install motd
sb install motd-generate-config

Updates the settings file with current instance info (Plex, Sonarr, Radarr, Lidarr, NZBGet, SABnzbd, etc.), effectively synchronizing the MOTD with your services' configuration.

Usage

Settings are available in /srv/git/saltbox/motd.yml.

Preview with:

sb motd --all

Role Defaults

Variables can be customized using the Inventory. (1)

  1. Example override

    motd_install: true
    
motd_install
# Setting this to false will skip the motd management and you can manage it manually
# Type: bool (true/false)
motd_install: true
motd_use_python
# Setting this to true will switch back to the old python motd
# Type: bool (true/false)
motd_use_python: false
motd_cli_path
# Type: string
motd_cli_path: "/usr/local/bin/sb"
motd_cli_flags
# Run sb motd --help to view what you can customize in terms of flags
# Type: string
motd_cli_flags: "--all --title 'Saltbox' --font ivrit --type parchment"
motd_use_pam_exec
# Setting this to true runs the motd scripts separately for each SSH login through pam_exec, instead of through pam_motd's shared /run/motd.dynamic file
# This stops the motd from coming up blank when another SSH connection starts at the same moment, such as MobaXterm's SFTP file browser
# Saltbox edits /etc/pam.d/sshd for this and saves a timestamped backup next to it (sshd.<number>.<date>@<time>~) every time it changes the file
# Setting this to false puts the stock pam_motd line back; if you changed /etc/pam.d/sshd yourself, you can restore one of the backups manually
# Type: bool (true/false)
motd_use_pam_exec: true
motd_services
# Service types:
# - multi_instance_apikey: Multiple instances with API key (sonarr, radarr, lidarr, readarr, overseerr)
# - multi_instance_token: Multiple instances with token (plex)
# - single_instance_apikey: Single instance with API key (sabnzbd)
# - single_instance_userpass: Single instance with username/password (nzbget)
# - multi_instance_userpass: Multiple instances with username/password (qbittorrent)
# - placeholder_userpass: Statically disabled username/password placeholder (rtorrent)
# Type: list
motd_services:
  - name: colors
    type: colors
  - name: emby
    type: multi_instance_token
    check_field: token
    output_field: token
  - name: jellyfin
    type: multi_instance_token
    check_field: token
    output_field: token
  - name: lidarr
    type: multi_instance_apikey
    check_field: api_key
    output_field: apikey
  - name: nzbget
    type: single_instance_userpass
    check_field: username
  - name: plex
    type: multi_instance_token
    check_field: token
    output_field: token
  - name: qbittorrent
    type: multi_instance_userpass_info
    check_field: username
  - name: rtorrent
    type: placeholder_userpass
    placeholder_name: rutorrent
    placeholder_url: https://rutorrent.{{ user.domain }}/RPC2
    placeholder_user: "{{ user.name }}"
  - name: radarr
    type: multi_instance_apikey
    check_field: api_key
    output_field: apikey
  - name: sabnzbd
    type: single_instance_apikey
    check_field: api_key
    output_field: apikey
  - name: sonarr
    type: multi_instance_apikey
    check_field: api_key
    output_field: apikey
  - name: systemd
    type: systemd
motd_colors
# Type: dict
motd_colors:
  text:
    label: "#FF79D0"
    value: "#12C78F"
    app_name: "#BF976F"
  status:
    warning: "#F5EF34"
    success: "#12C78F"
    error: "#EB4268"
  progress_bar:
    low: "#A8CC8C"
    high: "#DBAB79"
    critical: "#E88388"
motd_systemd
# Type: dict
motd_systemd:
  enabled: true
  additional_services: []
  display_names: {}