#!/bin/sh

REPO=<%=node[:backup][:repo]%>

if [ -d "/tmp/backup" ]
then
  cd /tmp/backup && git pull
else
  git clone $REPO /tmp/backup
fi

rm -r /var/www/blog
cp -r /tmp/backup/blog/blog /var/www
mysql blog < /tmp/backup/blog/db.sql
#!/bin/sh

REPO=<%=node[:backup][:repo]%>

if [ -d "/tmp/backup" ]
then
  cd /tmp/backup && git pull
else
  git clone $REPO /tmp/backup
fi

rm -r /var/www/blog
cp -r /tmp/backup/blog/blog /var/www
mysql blog < /tmp/backup/blog/db.sql

echo "define('WP_HOME','<%= node[:blog_dns_name]%>');" >> /var/www/blog/wp-config.php
echo "define('WP_SITEURL','<%= node[:blog_dns_name]%>');" >> /var/www/blog/wp-config.php
Make fix Blog DNS name
Make fix Blog DNS name
