2021-05-29 14:21:54 +02:00
|
|
|
#
|
2025-12-05 03:36:38 +01:00
|
|
|
# ~/.config/bashrc.d/60_server.sh -- Custom .bashrc additions for server environments
|
2021-05-29 14:21:54 +02:00
|
|
|
#
|
|
|
|
|
|
|
|
|
|
# Set this alias only on hosts where restic is installed
|
|
|
|
|
if which restic &>/dev/null; then
|
|
|
|
|
alias restic-source-env="source /etc/restic/restic.env"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
# Assume colors are set in global .bashrc:
|
|
|
|
|
# TRED, TGREEN, TBLUE, TGREENB, TCYANB, TWHITEB (bold), TRESET
|
|
|
|
|
|
|
|
|
|
# Set prompt: highlight hostname in red to signalize "you're on a server, be careful"
|
|
|
|
|
if [[ ${EUID} == 0 ]] ; then
|
|
|
|
|
PS1="${TRED}\u@\h ${TBLUE}\w ${TWHITEB}\$ ${TRESET}"
|
|
|
|
|
else
|
|
|
|
|
PS1="${TGREEN}\u@${TRED}\h ${TBLUE}\w ${TWHITEB}\$ ${TRESET}"
|
|
|
|
|
fi
|