Skip to content
Snippets Groups Projects

Service MOTD

  • Clone with SSH
  • Clone with HTTPS
  • Embed
  • Share
    The snippet can be accessed without any authentication.
    Authored by Ken Kyger

    Add the server status and recent logs to the login message for a dedicated server.

    99-service-banner 595 B
    #!/bin/sh
    
    echo "==============================================================================="
    echo "MyService Server Service"
    echo "==============================================================================="
    service my-service status | cat | head -n 10
    echo "==============================================================================="
    echo "MyService Logs"
    echo "==============================================================================="
    cat /var/log/syslog | grep my-service | tail -n 15
    echo "==============================================================================="
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Please register or to comment