feat: add motd-assist TUI for managing dynamic MOTDs
Initial Go project built with Bubble Tea and Lip Gloss: - Live preview and management of /etc/update-motd.d scripts - Embedded presets (ubuntu-default, minimal, server-dashboard) - Bundled POSIX sh style scripts (brand header, sysinfo panel, footer) - Snapshot/restore safety around applying changes - CLI subcommands preview, apply, restore, list-presets - Unit tests for detect, sanitize, and apply logic
This commit is contained in:
commit
d56659e21a
34 changed files with 3260 additions and 0 deletions
14
internal/assets/scripts/footer
Normal file
14
internal/assets/scripts/footer
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
#!/bin/sh
|
||||
# motd-assist :: footer — dezente Kernel-/Uptime-Zeile
|
||||
set -u
|
||||
|
||||
E=$(printf '\033')
|
||||
DIM="${E}[2m"
|
||||
R="${E}[0m"
|
||||
|
||||
K=$(uname -r 2>/dev/null || echo unknown)
|
||||
UP=$(uptime -p 2>/dev/null)
|
||||
[ -n "$UP" ] || UP=$(awk '{d=int($1/86400); h=int(($1%86400)/3600); printf "up %d days %d hours", d, h}' /proc/uptime 2>/dev/null)
|
||||
|
||||
[ -n "$UP" ] && printf '%b\n' "${DIM}${K} · ${UP}${R}"
|
||||
exit 0
|
||||
Loading…
Add table
Add a link
Reference in a new issue