| Server IP : 80.74.154.100 / Your IP : 216.73.217.0 Web Server : Apache System : Linux marissa.metanet.ch 4.18.0-553.141.2.lve.el7h.x86_64 #1 SMP Wed Jul 8 17:20:31 UTC 2026 x86_64 User : onlineadmin ( 10487) PHP Version : 8.5.7 Disable Function : opcache_get_status MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /home/httpd/vhosts/comeonline.ch/.OLD/ |
Upload File : |
# .bash_profile vs .bashrc
# http://www.joshstaiger.org/archives/2005/07/bash_profile_vs.html
# Function to source files if they exist.
sourcefileifitexists() {
if [ -f "$1" ]; then
source "$1"
fi
}
# Function to add directories to the $PATH. Checks if the exist and if they are already in the $PATH.
pathadd() {
if [ -d "$1" ] && [[ ":$PATH:" != *":$1:"* ]]; then
PATH="${PATH:+"$PATH:"}$1"
fi
}
# Function to add directories to the front of the $PATH. Checks if they exist and if they are already in the $PATH.
pathaddfront() {
if [ -d "$1" ] && [[ ":$PATH:" != *":$1:"* ]]; then
PATH="$1:${PATH:+"$PATH"}"
fi
}
# Get the aliases and functions
sourcefileifitexists $HOME/.bashrc
# Load z so we can jump around. See https://github.com/rupa/z for more details.
sourcefileifitexists $HOME/bin/z/z.sh
# Drush completions for Bash
sourcefileifitexists $HOME/.composer/global/drush/drush/vendor/drush/drush/drush.complete.sh
# User specific environment and startup programs
#pathaddfront $HOME/bin
PHP_PATH=/opt/cpanel/ea-php71/root/usr/bin
pathaddfront $PHP_PATH
BASH_ENV=$HOME/.bashrc
USERNAME="$USER"
export USERNAME BASH_ENV PHP_PATH PATH
# Set nano as the default editor in bash
export EDITOR=$(which nano)
export VISUAL=$(which nano)
echo ""
if [ -f ~/.banner ]; then
cat ~/.banner
fi
myipaddress=$(/sbin/ifconfig venet0:0 2>/dev/null |grep 'inet addr' | cut -d: -f2 | awk '{ print $1}')
if [ -z ${myipaddress} ]; then
myipaddress=$(/sbin/ifconfig eth0 2>/dev/null |grep 'inet addr' | cut -d: -f2 | awk '{ print $1}')
fi
myhostname=$(hostname --long)
echo "Welcome!"
echo "System IP address:" $myipaddress
echo "System hostname:" $myhostname
echo ""