Prerequis : neofetch
This commit is contained in:
jfontaine35 2020-12-21 14:28:30 +01:00 committed by GitHub
parent ea3b86b565
commit 7a53c2b2ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 38 additions and 23 deletions

View File

@ -1,30 +1,45 @@
# ~/.profile: executed by the command interpreter for login shells. # ~/.profile: executed by Bourne-compatible login shells.
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
# exists.
# see /usr/share/doc/bash/examples/startup-files for examples.
# the files are located in the bash-doc package.
# the default umask is set in /etc/profile; for setting the umask if [ "$BASH" ]; then
# for ssh logins, install and configure the libpam-umask package. if [ -f ~/.bashrc ]; then
#umask 022 . ~/.bashrc
# if running bash
if [ -n "$BASH_VERSION" ]; then
# include .bashrc if it exists
if [ -f "$HOME/.bashrc" ]; then
. "$HOME/.bashrc"
fi fi
fi fi
# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
PATH="$HOME/bin:$PATH"
fi
# set PATH so it includes user's private bin if it exists mesg n || true
if [ -d "$HOME/.local/bin" ] ; then
PATH="$HOME/.local/bin:$PATH"
fi
##########################################################
# Custom Profile
##########################################################
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;34m\]\u@\h \[\033[01;32m\]\w\[\033[00m\]\$ '
export LS_OPTIONS='--color=auto'
eval "`dircolors`"
alias ls='ls $LS_OPTIONS'
alias ll='ls $LS_OPTIONS -l'
alias l='ls $LS_OPTIONS -lA'
#
# Some more alias to avoid making mistakes:
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
alias maj='apt update && apt full-upgrade -y && apt autoremove -y'
alias sp='source .profile'
clear
neofetch neofetch
alias disk="df -h | grep DATAS | sed -e 's/ /:/g' | sed -e 's/::/:/g'"
echo "Bienvenue sur : $(hostname -f) ($(hostname -i)) !"
echo "******************************************************"
echo "Note: Toutes actions sur ce serveur sont enregistrees."
echo "------------------------------------------------------"
echo "Date : $(date) "
echo "Uptime : $(uptime -p)"
echo "Disk : Use->$(disk | cut -d ':' -f4) / Free->$(disk | cut -d ':' -f6) (Use: $(disk | cut -d ':' -f7))"
echo -e "Apache2 : \033[01;32m $(service apache2 status | grep Active | cut -d ' ' -f5,6) \033[01;37m"
echo -e "MariaDB : \033[01;32m $(service mysql status | grep Active | cut -d ' ' -f5,6) \033[01;37m"
echo ""