{"id":16938738,"url":"https://github.com/dsnet/motd-generator","last_synced_at":"2025-07-26T12:33:30.490Z","repository":{"id":132959741,"uuid":"41656873","full_name":"dsnet/motd-generator","owner":"dsnet","description":"Custom message-of-the-day (MOTD) generator intended to be informative about the system you are logging in to.","archived":false,"fork":false,"pushed_at":"2018-09-14T22:19:12.000Z","size":400,"stargazers_count":44,"open_issues_count":2,"forks_count":14,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-04T06:51:10.368Z","etag":null,"topics":["motd","performance-metrics"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dsnet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-08-31T05:08:03.000Z","updated_at":"2023-06-16T03:58:32.000Z","dependencies_parsed_at":null,"dependency_job_id":"690a6cce-06c6-454e-8a57-9654ceab8a55","html_url":"https://github.com/dsnet/motd-generator","commit_stats":{"total_commits":37,"total_committers":1,"mean_commits":37.0,"dds":0.0,"last_synced_commit":"1494e41cbcaff78cccb60d5693bd0c2e55aba78e"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dsnet/motd-generator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dsnet%2Fmotd-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dsnet%2Fmotd-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dsnet%2Fmotd-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dsnet%2Fmotd-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dsnet","download_url":"https://codeload.github.com/dsnet/motd-generator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dsnet%2Fmotd-generator/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267168761,"owners_count":24046707,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-26T02:00:08.937Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["motd","performance-metrics"],"created_at":"2024-10-13T21:02:23.452Z","updated_at":"2025-07-26T12:33:30.387Z","avatar_url":"https://github.com/dsnet.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Message-of-the-Day Generator #\r\n\r\n## Introduction ##\r\n\r\n![motd](doc/motd.png)\r\n\r\nThis is a custom message of the day (MOTD) designed to be as practical and\r\ninformative as possible. The truth is, no one actually reads the MOTD. As such,\r\nthe MOTD should contain useful, yet minimal, information about the host system\r\nsuch that a quick glance at it when logging in may actually be worth a person's\r\nprecious time. This way, any potential issues are noticed and not naively\r\nignored. This MOTD generator scripts has the ability to output text in color.\r\nUsing this feature, potential issues can be highlighted for easy identification.\r\n\r\nWarnings that can be highlighted:\r\n\r\n* The login time if this is the first login since a reboot\r\n* The last login hostname if it differs from the current login hostname\r\n* CPU utilization if it exceeds a threshold\r\n* CPU load if it exceeds a threshold\r\n* RAM usage if it exceeds a threshold\r\n* Disk usage if it exceeds a threshold\r\n* Network load if it exceeds a threshold\r\n\r\nFeel free to modify the scripts as you see fit!\r\n\r\n\r\n## Files ##\r\n\r\n* **motd_gen.py**: Script to generate informative MOTD display\r\n* **motd_stat.py**: Statistic gathering daemon for MOTD\r\n* **motd_stat**: Init.d script to start the motd_stat daemon\r\n\r\n\r\n## Installation ##\r\n\r\n```bash\r\n# Be root to install\r\nsu\r\n\r\n# Download the archive\r\ncurl -L https://github.com/dsnet/motd-generator/archive/master.tar.gz | tar -zxv\r\n\r\n# Move local copy\r\nSRC_ROOT=/usr/local/motd_gen\r\nmv motd-generator-master $SRC_ROOT\r\n\r\n# Setup the daemon service\r\nln -s $SRC_ROOT/motd_stat /etc/init.d/motd-stat\r\nupdate-rc.d motd-stat defaults\r\nservice motd-stat start\r\n\r\n# Nuke old MOTD file\r\nrm /etc/motd\r\ntouch /etc/motd\r\n\r\n# Prevent other modules from printing redundant information\r\nsed -i -e 's|\\(PrintLastLog\\s*\\)yes|\\1no|' /etc/ssh/sshd_config\r\nsed -i -e 's|\\(PrintMotd\\s*\\)yes|\\1no|' /etc/ssh/sshd_config\r\nsed -i -e 's|\\(^\\s*session.*pam_mail.so\\)|#\\1|' /etc/pam.d/*\r\nsed -i -e 's|\\(^\\s*session.*pam_motd.so\\)|#\\1|' /etc/pam.d/*\r\nsed -i -e 's|\\(^\\s*session.*pam_lastlog.so\\)|#\\1|' /etc/pam.d/*\r\n/etc/init.d/ssh restart\r\n\r\n# Print the custom MOTD upon every login\r\necho -e \"\r\nif [ -e $SRC_ROOT/motd_gen.py ]; then\r\n\\tif [ -x /usr/bin/dircolors ]; then\r\n\\t\\t$SRC_ROOT/motd_gen.py --color --warn --border\r\n\\telse\r\n\\t\\t$SRC_ROOT/motd_gen.py --border\r\n\\tfi\r\nfi\" \u003e\u003e /etc/profile\r\n```\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdsnet%2Fmotd-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdsnet%2Fmotd-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdsnet%2Fmotd-generator/lists"}