Skip to content

Commit 7ffd77e

Browse files
committed
feat(motd,install): enable system update-motd and default to full panel
1 parent eace7ab commit 7ffd77e

File tree

5 files changed

+14
-4
lines changed

5 files changed

+14
-4
lines changed

Scripts/install/install.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,16 @@ EOS
190190

191191
install_motd_hooks_global() {
192192
echo "$(cat "${THIS_DIR}/../../asset/shell/hooks/profile.d_solen.sh")" | sudo tee /etc/profile.d/solen.sh >/dev/null
193+
# update-motd hook for SSH logins (Debian/Ubuntu/Proxmox)
194+
if [ -d /etc/update-motd.d ]; then
195+
sudo tee /etc/update-motd.d/90-solen >/dev/null <<'E'
196+
#!/bin/sh
197+
[ -x /usr/local/bin/serverutils ] || exit 0
198+
[ -t 1 ] || exit 0
199+
serverutils run motd/solen-motd -- --full
200+
E
201+
sudo chmod +x /etc/update-motd.d/90-solen
202+
fi
193203
if command -v fish >/dev/null 2>&1; then
194204
echo "$(cat "${THIS_DIR}/../../asset/shell/hooks/conf.d_solen.fish")" | sudo tee /etc/fish/conf.d/solen.fish >/dev/null
195205
fi

asset/shell/hooks/motd_bash.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ case $- in *i*) : ;; *) return ;; esac
55
if [ -n "$SOLEN_NO_TUI" ] || [ "$TERM" = "dumb" ]; then
66
:
77
else
8-
command -v serverutils >/dev/null 2>&1 && SOLEN_RUN_QUIET=1 serverutils run motd/solen-motd --
8+
command -v serverutils >/dev/null 2>&1 && SOLEN_RUN_QUIET=1 serverutils run motd/solen-motd -- --full
99
fi
1010
# <<< SOLEN MOTD_BASH (managed) <<<

asset/shell/hooks/motd_fish.fish

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
if status is-interactive
33
if test -z "$SOLEN_NO_TUI" -a "$TERM" != "dumb"
44
if type -q serverutils
5-
env SOLEN_RUN_QUIET=1 serverutils run motd/solen-motd --
5+
env SOLEN_RUN_QUIET=1 serverutils run motd/solen-motd -- --full
66
end
77
end
88
end

asset/shell/hooks/motd_zsh.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ case $- in *i*) : ;; *) return ;; esac
33
if [[ -n "$SOLEN_NO_TUI" || "$TERM" == "dumb" ]]; then
44
:
55
else
6-
command -v serverutils >/dev/null 2>&1 && SOLEN_RUN_QUIET=1 serverutils run motd/solen-motd --
6+
command -v serverutils >/dev/null 2>&1 && SOLEN_RUN_QUIET=1 serverutils run motd/solen-motd -- --full
77
fi
88
# <<< SOLEN MOTD_ZSH (managed) <<<

asset/shell/hooks/profile.d_solen.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ if [ -n "$SOLEN_NO_TUI" ] || [ "$TERM" = "dumb" ]; then
55
:
66
else
77
if command -v serverutils >/dev/null 2>&1; then
8-
SOLEN_RUN_QUIET=1 serverutils run motd/solen-motd --
8+
SOLEN_RUN_QUIET=1 serverutils run motd/solen-motd -- --full
99
fi
1010
fi

0 commit comments

Comments
 (0)