Skip to content

This will set up a MOTD that displays the hostname (including the Debian version), IP address, uptime, and disk usage whenever a user logs in to the system.

Notifications You must be signed in to change notification settings

Snake16547/Debian-Simple-MOTD-Monitor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

db1e2ca · Oct 28, 2024

History

6 Commits
Jul 17, 2024
Oct 28, 2024

Repository files navigation

Debian-Simple-MOTD-Monitor

This will set up a MOTD that displays the hostname (including the Debian version), IP address, uptime, and disk usage whenever a user logs in to the system.

Usage:

Copy the above script with

wget https://raw.githubusercontent.com/Snake16547/Debian-Simple-MOTD-Monitor/main/setup.sh

Make it executable with

chmod +x setup.sh

Run it with

sudo ./setup.sh

This will set up a MOTD that displays the hostname (including the Debian version), IP address, uptime, and disk usage whenever a user logs in to the system.

Explanation:

Usage Function: Displays how to use the script.
get_debian_version Function: Retrieves the Debian version from /etc/debian_version.
create_motd_script Function: Creates the MOTD script /etc/profile.d/motd.sh that displays hostname, Debian version, IP address, uptime, and disk usage.
Main Script:
    Checks if the script is run as root.
    Calls create_motd_script to generate the MOTD script.
    Provides feedback upon completion.

About

This will set up a MOTD that displays the hostname (including the Debian version), IP address, uptime, and disk usage whenever a user logs in to the system.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages