| Server IP : 172.67.201.108 / Your IP : 216.73.216.101 Web Server : Apache/2.4.68 (Amazon Linux) OpenSSL/3.5.5 System : Linux ip-172-31-69-123.ec2.internal 6.1.176-223.369.amzn2023.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Jul 24 13:34:27 UTC 2026 x86_64 User : ec2-user ( 1000) PHP Version : 8.4.23 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/home2/mommybites/deploy_scripts/ |
Upload File : |
#Generic script for deploying site code #Parameters: # $1 Bitbucket repo name # $2 Target directory if [ $# -lt 2 ]; then echo "This script should not run on its own and must be called from other scripts only - aborting!" exit 1 fi if [ ! -d "/home/home2/mommybites/$2" ]; then echo "Target directory does not exist - aborting!" exit 1 fi # **** Backup current code timestamp=$(date +"%Y-%m-%d-%H-%M-%S") echo $timestamp rm /home/home2/mommybites/source_backups/$1-$timestamp.zip zip -r /home/home2/mommybites/source_backups/$1-$timestamp.zip /home/home2/mommybites/$2 # **** Clear out code directory cd /home/home2/mommybites/$2 rm -rf * # **** Pull down repo from Bitbucket echo "Enter your Bitbucket username: " read username git clone -v https://[email protected]/latcomsystems/$1.git /home/home2/mommybites/$2 # **** Get rid of .git so that this is not under version control rm -rf .git echo "Code deployed successfully!"