Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Bash script stops execution in the middle of the script without any error
- #!/bin/sh
- DATE=`date +%Y-%m-%d_%H%M.%S`
- BASEDIR="/var/www/db"
- RELEASEDIR="$DATE";
- RELEASEDIRFULL="$BASEDIR/releases/$RELEASEDIR"
- mkdir -p "$RELEASEDIRFULL"
- echo "Chdir to "$RELEASEDIRFULL""
- cd "$RELEASEDIRFULL"
- echo "Getting copy from dev"
- ssh dev.example.tld "cd /tmp; cd /sites/db; tar -zcvp --exclude data --exclude scripts -f - *" | tar zxvpf -
- ln -s /var/www/db/data data
- ln -s /var/www/db/scripts scripts
- cd $BASEDIR
- rm htdocs; ln -s releases/$RELEASEDIR htdocs
Advertisement
Add Comment
Please, Sign In to add comment