Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Change cp to rsync #2

Merged
merged 3 commits into from

2 participants

@aspires

I changed all instances of cp to rsync

@aspires

disregard the "create_user" commit -- I incorrectly added it to the branch. It will be in another pull request.

@okor okor merged commit 6b4df59 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on May 29, 2012
  1. @aspires
  2. @aspires

    Changed all cps to rsync

    aspires authored
  3. @aspires
This page is out of date. Refresh to see the latest.
Showing with 10 additions and 12 deletions.
  1. +10 −12 build.sh
View
22 build.sh
@@ -18,8 +18,6 @@ DEFAULT_USER="deployer"
TMUX_CONFIG="$LEMPress/configs/tmux.conf"
FASTCGI_INIT="$LEMPress/configs/fastcgi-init.sh"
-
-
function get_website_url() {
echo -n "Enter website URL [DEFAULT:new-wordpress-site.com]: "
read USER_URL
@@ -109,7 +107,7 @@ function install_wordpress() {
# Configure
function configure_virtualhost() {
- sudo cp "$LEMPress/configs/LEMPress-virtualhost.txt" "/etc/nginx/sites-available/$URL"
+ sudo rsync "$LEMPress/configs/LEMPress-virtualhost.txt" "/etc/nginx/sites-available/$URL"
sudo sed -i "s/URL/$URL/g" "/etc/nginx/sites-available/$URL"
sudo ln -s "/etc/nginx/sites-available/$URL" "/etc/nginx/sites-enabled/$URL"
sudo rm "/etc/nginx/sites-enabled/default"
@@ -121,26 +119,26 @@ function configure_nginx() {
}
function configure_fastcgi() {
- sudo cp "$FASTCGI_INIT" "/etc/init.d/php-fastcgi"
+ sudo rsync "$FASTCGI_INIT" "/etc/init.d/php-fastcgi"
sudo chmod +x "/etc/init.d/php-fastcgi"
sudo update-rc.d php-fastcgi defaults
}
function configure_tmux() {
- cp "$LEMPress/configs/tmux.conf" "$HOME/.tmux.conf"
+ rsync "$LEMPress/configs/tmux.conf" "$HOME/.tmux.conf"
}
function configure_bash() {
- cp "$HOME/.bashrc" "$HOME/.bashrc~backup"
- cp "$LEMPress/configs/bashrc" "$HOME/.bashrc"
+ rsync "$HOME/.bashrc" "$HOME/.bashrc~backup"
+ rsync "$LEMPress/configs/bashrc" "$HOME/.bashrc"
- sudo cp /root/.bashrc /root/.bashrc~backup
- sudo cp "$LEMPress/configs/bashrc" /root/.bashrc
+ sudo rsync /root/.bashrc /root/.bashrc~backup
+ sudo rsync "$LEMPress/configs/bashrc" /root/.bashrc
}
function configure_varnish() {
- sudo cp "$LEMPress/configs/varnish" "/etc/default/varnish"
- sudo cp "$LEMPress/configs/default.vcl" "/etc/varnish/default.vcl"
+ sudo rsync "$LEMPress/configs/varnish" "/etc/default/varnish"
+ sudo rsync "$LEMPress/configs/default.vcl" "/etc/varnish/default.vcl"
}
@@ -164,7 +162,7 @@ function create_db() {
}
function configure_wordpress() {
- cp "$HOME/sites/$URL/wp-config-sample.php" "$HOME/sites/$URL/wp-config.php"
+ rsync "$HOME/sites/$URL/wp-config-sample.php" "$HOME/sites/$URL/wp-config.php"
sed -i "s/database_name_here/$DB_NAME/g" "$HOME/sites/$URL/wp-config.php"
sed -i "s/username_here/$DB_USER/g" "$HOME/sites/$URL/wp-config.php"
sed -i "s/password_here/$DB_PASSWORD/g" "$HOME/sites/$URL/wp-config.php"
Something went wrong with that request. Please try again.