File tree Expand file tree Collapse file tree 5 files changed +14
-4
lines changed
Expand file tree Collapse file tree 5 files changed +14
-4
lines changed Original file line number Diff line number Diff line change 190190
191191install_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
Original file line number Diff line number Diff line change @@ -5,6 +5,6 @@ case $- in *i*) : ;; *) return ;; esac
55if [ -n " $SOLEN_NO_TUI " ] || [ " $TERM " = " dumb" ]; then
66 :
77else
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
99fi
1010# <<< SOLEN MOTD_BASH (managed) <<<
Original file line number Diff line number Diff line change 22if 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
88end
Original file line number Diff line number Diff line change @@ -3,6 +3,6 @@ case $- in *i*) : ;; *) return ;; esac
33if [[ -n " $SOLEN_NO_TUI " || " $TERM " == " dumb" ]]; then
44 :
55else
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
77fi
88# <<< SOLEN MOTD_ZSH (managed) <<<
Original file line number Diff line number Diff line change @@ -5,6 +5,6 @@ if [ -n "$SOLEN_NO_TUI" ] || [ "$TERM" = "dumb" ]; then
55 :
66else
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
1010fi
You can’t perform that action at this time.
0 commit comments