From a9acda90df2ba4a4777fe263005a5d45ffd869e0 Mon Sep 17 00:00:00 2001 From: Andrew DeFaria Date: Fri, 17 Dec 2021 21:46:48 +0000 Subject: [PATCH] More changes for cPanel --- rc/bash_login | 3 +++ rc/client_scripts/cPanel | 21 ++++++++++++++++++--- rc/functions | 8 +++++--- rc/sshconfig | 7 ++++--- rc/vimrc | 1 + 5 files changed, 31 insertions(+), 9 deletions(-) diff --git a/rc/bash_login b/rc/bash_login index e174738..c0cf08f 100644 --- a/rc/bash_login +++ b/rc/bash_login @@ -312,6 +312,9 @@ for script in $(\ls ~/.rc/client_scripts); do fi done +# Set prompt as client customization may have changed things +set_prompt + # Set display to local export DISPLAY=${DISPLAY:-:0} diff --git a/rc/client_scripts/cPanel b/rc/client_scripts/cPanel index 2e80817..aec6eeb 100755 --- a/rc/client_scripts/cPanel +++ b/rc/client_scripts/cPanel @@ -12,9 +12,9 @@ # (c) Copyright 2013, ClearSCM, Inc., all rights reserved. # ################################################################################ -append_to_path /usr/local/cpanel/3rdparty/lib/path-bin -append_to_path /usr/local/cpanel/3rdparty/bin -append_to_path /usr/local/cpanel/build-tools +prepend_to_path /usr/local/cpanel/build-tools +prepend_to_path /usr/local/cpanel/3rdparty/lib/path-bin +prepend_to_path /usr/local/cpanel/3rdparty/bin append_to_path /usr/local/sbin append_to_path /usr/local/bin append_to_path /usr/sbin @@ -22,8 +22,12 @@ append_to_path /opt/cpanel/composer/bin append_to_path /opt/cplint/bin append_to_path /root/bin +# Intended to be used for root +WIZARD="CPanel" + export CDPATH=/usr/local export ulc=/usr/local/cpanel +export ulp=/usr/local/cp-monitoring-cpanel-plugin export CPANEL_TEAM='scrum' #alias ulc="cd /usr/local/cpanel" @@ -55,3 +59,14 @@ function ulc { cd $ulc fi } # ulc + +function ulp { + path=$1 + + if [ -s "$1" ]; then + cd $ulp/$path + else + cd $ulp + fi +} # ulp + diff --git a/rc/functions b/rc/functions index 28135c7..48c823d 100644 --- a/rc/functions +++ b/rc/functions @@ -15,6 +15,8 @@ ESC=$(echo "\033") CR=$(echo "\015") +export WIZARD="Wizard" + view_name= # Function to set the title bar. Works on the terminal emulators listed. @@ -90,7 +92,7 @@ function title { # view and a string to indicate that you are root. function set_title { if [ $($id -u) -eq 0 ]; then - root="Wizard " + root="$WIZARD " else root= fi @@ -124,9 +126,9 @@ function set_prompt { "$TERM" = "xtermc" -o \ "$TERM" = "xterm-256color" -o \ "$TERM" = "vt220" ]; then - ROOT="\[${ROOT_COLOR}\]Wizard\[$NORMAL\] " + ROOT="\[${ROOT_COLOR}\]$WIZARD\[$NORMAL\] " else - ROOT="Wizard " + ROOT="$WIZARD " fi else ROOT="" diff --git a/rc/sshconfig b/rc/sshconfig index 77c6e36..0cda956 100644 --- a/rc/sshconfig +++ b/rc/sshconfig @@ -1,7 +1,7 @@ StrictHostKeyChecking no LogLevel ERROR -Host jupiter cpanel github.com +Host jupiter cpanel github.com sandbox sandboxal ForwardX11 no ForwardX11Trusted no @@ -27,6 +27,9 @@ Host sandbox Hostname 10.2.99.60 IdentityFile ~/.ssh/cpanelkey +Host enterprise.cpanel.net + IdentityFile ~/.ssh/cpanelkey + Host 10.2.* sandbox* ForwardAgent yes StrictHostKeyChecking no @@ -40,5 +43,3 @@ Host 10.2.* sandbox* Host * ServerAliveInterval 300 ServerAliveCountMax 2 - ForwardX11 yes - ForwardX11Trusted yes diff --git a/rc/vimrc b/rc/vimrc index 1e5f66e..f919214 100644 --- a/rc/vimrc +++ b/rc/vimrc @@ -8,3 +8,4 @@ set hlsearch set ff=unix colorscheme pablo map!   +set number -- 2.17.1