# alperen-cpu/shell-welcome-message architecture

> Architecture diagram of the GitHub repository alperen-cpu/shell-welcome-message, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-14). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/alperen-cpu/shell-welcome-message
- Repository: https://github.com/alperen-cpu/shell-welcome-message

## Overview

This small repository provides CentOS and Debian login-message scripts. The documented workflow installs and configures msmtp, then arranges for a script to run during login or MOTD generation so login information can be emailed. The README explicitly connects CentOS’s /etc/profile command to centos.sh; it describes enabling Debian’s MOTD hook but does not explicitly show that hook invoking debian.sh. Script internals were not available, so no finer processing stages are inferred.

Main entry points: [`centos.sh`](https://github.com/alperen-cpu/shell-welcome-message/blob/main/centos.sh) (CentOS message), [`debian.sh`](https://github.com/alperen-cpu/shell-welcome-message/blob/main/debian.sh) (Debian message)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_login_scripts["Login scripts"]
  node_centos_script["CentOS message<br/>[centos.sh]"]
  node_debian_script["Debian message<br/>[debian.sh]"]
end

node_login(("Login session"))
node_profile["/etc/profile"]
node_debian_hook["Debian MOTD hook"]
node_msmtp["msmtp"]
node_mail_recipient(("Email recipient"))

node_login -.->|"starts"| node_profile
node_profile -->|"runs"| node_centos_script
node_centos_script -.->|"sends login info"| node_msmtp
node_debian_script -.->|"sends login info"| node_msmtp
node_msmtp -.->|"emails"| node_mail_recipient

click node_centos_script "https://github.com/alperen-cpu/shell-welcome-message/blob/main/centos.sh"
click node_debian_script "https://github.com/alperen-cpu/shell-welcome-message/blob/main/debian.sh"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_centos_script,node_debian_script toneBlue
class node_login,node_profile,node_debian_hook,node_msmtp,node_mail_recipient toneIndigo
```

## Components

### Login scripts

- [CentOS message](https://github.com/alperen-cpu/shell-welcome-message/blob/main/centos.sh): `centos.sh`
- [Debian message](https://github.com/alperen-cpu/shell-welcome-message/blob/main/debian.sh): `debian.sh`

### Other components

- **Login session**
- **/etc/profile**
- **Debian MOTD hook**
- **msmtp**
- **Email recipient**

## Connections

- Login session → /etc/profile: starts
- /etc/profile → CentOS message: runs (evidence: `README.md`)
- CentOS message → msmtp: sends login info
- Debian message → msmtp: sends login info
- msmtp → Email recipient: emails
