Created
June 27, 2019 11:46
-
-
Save RafikFarhad/a020ce44074cdedb8d5b5d256b0a4df2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Author: Rafik Farhad | |
# 26-06-2019 | |
# cat file.sh | SSHPASS=****** sshpass -e ssh root@host | |
echo -e "\e[32mLogged in to server\e[39m" | |
echo -e "" | |
echo -e "\e[32m--------------------------------------\e[39m" | |
echo -e "\e[32mBackend\e[39m" | |
echo -e "\e[32m--------------------------------------\e[39m" | |
cd /var/www/html/{path_to_root/} | |
echo -e "\e[32mCurrent Working Directory\e[39m" | |
echo -e $(pwd) | |
echo -e "\e[32mPulling API\e[39m" | |
git pull https://rafikfarhad:*********@gitlab.com/{repo_path} develop | |
echo -e "" | |
echo -e "\e[32m--------------------------------------\e[39m" | |
echo -e "\e[32mFront End\e[39m" | |
echo -e "\e[32m--------------------------------------\e[39m" | |
cd /var/www/html/{path_to_root/} | |
echo -e "\e[32mCurrent Working Directory\e[39m" | |
echo -e $(pwd) | |
echo -e "\e[32mPulling Vue Production\e[39m" | |
git pull https://rafikfarhad:*********@gitlab.com/{repo_path} master | |
# echo -e "Clearing password from bash history" | |
# for h in $(seq $(history | tail -1 | awk '{print $1-12}') $(history | tail -1 | awk '{print $1}') | tac); do | |
# history -d $h | |
# done | |
echo -e "" | |
echo -e "\e[32m!~_ DONE _~!\e[39m" | |
exit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment