bashrc/.bashrc.d/99-autostart.bashrc

15 lines
456 B
Plaintext
Raw Normal View History

2023-03-18 12:49:08 +01:00
#!/usr/bin/env bash
# ~/.bashrc: executed by bash(1) for non-login shells.
# ==============================
# AUTOSTART
# ==============================
2023-03-19 09:08:59 +01:00
# run MOTD at login only in an ssh session containing the env $SSH_MOTD=1
2023-03-18 12:49:08 +01:00
if [[ -n "${TMUX}" ]] && [[ -n "${SSH_CONNECTION}" ]] && [[ "${SSH_MOTD-}" == 1 ]] && [[ -f "/etc/update-motd.d/00-motdfetch" ]]; then
2023-03-19 09:08:59 +01:00
motd
2023-03-18 12:49:08 +01:00
else
2023-03-19 09:08:59 +01:00
# use function pgdown to get the prompt to terminal window bottom
pgdown
2023-03-18 12:49:08 +01:00
fi