# -*-sh-*-

if [ "$HOSTNAME" = "linux1" ];
then
    apache_bin_prefix=/usr/local/apache/bin/
    apachectl=${apache_bin_prefix}apachectl
else
    apachectl=apachectl
fi
    
alias graceful='${apachectl} graceful'
alias rehup="${apachectl} restart"
alias restart="${apachectl} restart"
alias start="${apachectl} start"
alias starts="${apachectl} startssl"

alias stop="${apachectl} stop"
alias configtest="${apachectl} configtest"

if [ "$HOSTNAME" = "linux1" ];
then
    alias RS="stop && sleep 2 && start"
    alias RSS="stop && sleep 2 && starts"
else
    alias RS="/i/apache2 restart"
fi


# kahua & my web
alias ka="rlwrap /usr/bin/kahua/kahua-admin"
alias rsm='rsync --times --partial -v --recursive --cvs-exclude www.ruska.it:/'
# alias lsindex='ls *jpg |sed -e \\'s|^\(.*\)$|<a href="\1"><img src=".thumbnails/\1"></a>|\\' > index.html!'
alias lsindex="ls *jpg |sed -e 's|^\(.*\)$|<a href=\"\1\"><img src=\".thumbnails/\1\"></a>|' > index.html!"





if [  ! -z "${LOGNAME}" -a "$LOGNAME" = "postgres" ];
then
    alias TT='T /postgres/log/server'
else


access_log_file="/linux/2/var/log/apache2/maruska-color.log"
if [ "$(/bin/hostname)" =  "linux2" ]
then
    #"/linux/1/usr/local/apache/logs/access_log_color"

    alias TT='T ${access_log_file}'
    alias lgT='lg -f ${access_log_file}'
    # access_log
#   alias TT='T /etc/apache2/logs/access_log'
#    alias lgT='lg -f /linux/1/usr/local/apache/logs/access_log_color'
else
# mmc: It's now the same!
    alias TT='T ${access_log_file}'
    alias lgT='lg -f ${access_log_file}'

#    alias TT='T /linux/1/usr/local/apache/logs/access_log_color'
#    alias lgT='lg -f /linux/1/usr/local/apache/logs/access_log_color'
fi    
fi
alias apa="T /usr/local/apache/logs/access_log| /usr/local/ACTIVITY/perl/apache_log_color.pl"


