There are 10 cPanel accounts in my WHM panel. i write shell script and run "git pull" code in every 10 accounts using SHELL SCRIPT
. first 05 is okay. 6th one stuck , and my ip marked as a block one.
. first 05 is okay. 6th one stuck , and my ip marked as a block one.
Code:
#Get Command List
#cd /customscript/permission_and_individual_commands && bash run.sh
cd "/customscript/github";
commands=$(<command_list.txt)
echo $commands
web_root="/home"
cd $web_root
for entry in "$web_root"/*
do
entry=$(find -L "$entry" -name "*.git");
if [ ! -z "$entry" ]; then
#Get .git enable web folders
web_folder_path=$(echo $entry | sed -e "s/\.git//g")
web_folder_path=$(echo $web_folder_path | sed -e "s/\/www//g")
web_folder_path=$(echo $web_folder_path | sed -e "s/\/lms//g")
web_folder_path=($web_folder_path)
#log to the cPanel public_html folder
web_folder_path=$web_folder_path"public_html"
cd $web_folder_path
#Run Command List for each cPanel
echo "cPanel Path : $web_folder_path"
git stash;
git pull;
git reset --hard;
export COMPOSER_ALLOW_SUPERUSER=1;
composer config -g repo.packagist composer https://packagist.org
composer update
fi
done
Last edited by a moderator: