add root timeout
This commit is contained in:
parent
b7d3bd3023
commit
d68a65338f
1 changed files with 3 additions and 0 deletions
|
@ -11,6 +11,7 @@ if [[ $- = *i* ]] ; then
|
|||
#echo "interactive shell" >&2
|
||||
|
||||
# define variables
|
||||
[ -z "${MYSHELLCONFIIG_ROOT_TMOUT+x}" ] && MYSHELLCONFIIG_ROOT_TMOUT=0
|
||||
[ -z "${USERNAME+x}" ] && USERNAME="$USER"
|
||||
[ -z "${USEREMAIL+x}" ] && USEREMAIL="$USER@$(domainname -f)"
|
||||
[ -z "${FULLNAME+x}" ] && FULLNAME="$(getent passwd $USER | cut -d ":" -f 5 | cut -d ',' -f 1)"
|
||||
|
@ -32,6 +33,8 @@ if [[ $- = *i* ]] ; then
|
|||
SGIT="git -C ${MYSHELLCONFIG_BASE}"
|
||||
export MYSHELLCONFIG_BASE MYSHELLCONFIG_LOGDIR MYSHELLCONFIG_LOGFILE SGIT MYSHELLCONFIG_VIM_PLUGINS
|
||||
|
||||
# if we are root, exit after 5 Minutes
|
||||
[ $( id -u ) -eq 0 ] && TMOUT=${MYSHELLCONFIIG_ROOT_TMOUT}
|
||||
cat << EOF >> "${MYSHELLCONFIG_LOGFILE}"
|
||||
------- start -------------- $(date) ---------------8<--
|
||||
|
||||
|
|
Loading…
Reference in a new issue