Guest User

Untitled

a guest
Jul 4th, 2012
31
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. Bash script stops execution in the middle of the script without any error
  2. #!/bin/sh
  3. DATE=`date +%Y-%m-%d_%H%M.%S`
  4. BASEDIR="/var/www/db"
  5. RELEASEDIR="$DATE";
  6. RELEASEDIRFULL="$BASEDIR/releases/$RELEASEDIR"
  7. mkdir -p "$RELEASEDIRFULL"
  8. echo "Chdir to "$RELEASEDIRFULL""
  9. cd "$RELEASEDIRFULL"
  10. echo "Getting copy from dev"
  11. ssh dev.example.tld "cd /tmp; cd /sites/db; tar -zcvp --exclude data --exclude scripts -f - *" | tar zxvpf -
  12. ln -s /var/www/db/data data
  13. ln -s /var/www/db/scripts scripts
  14. cd $BASEDIR
  15. rm htdocs; ln -s releases/$RELEASEDIR htdocs
Advertisement
Add Comment
Please, Sign In to add comment