Commit 8d9eb053 authored by Miloš Diviš's avatar Miloš Diviš
Browse files

local paths corrected

parent 6864be0d
......@@ -2,7 +2,7 @@
# setup
......@@ -11,14 +11,17 @@ common_exclude=('*.ssh' '/temp/*' '/log/*' '/nbproject' '/.git' '.gitignore' 'co
current_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd $current_dir
# set maintenance mode
echo '* setting maintenance mode on remote app'
rsync -v --dry-run \
"$server:$remote_dir/www/index.php $current_dir/temp/"
"$server:$remote_dir/www/index.php temp/"
sed -i "s/\/\/\s*require '.maintenance.php';/require '.maintenance.php';/" index.php
rsync -v --dry-run \
$current_dir/temp/index.php "$server:$remote_dir/www/"
"temp/index.php $server:$remote_dir/www/"
# create exclude text file
for i in "${rsync_exclude[@]}"
......@@ -30,24 +33,22 @@ do
echo $i >> exclude.txt
### echo `cat exclude.txt`
echo 'Starting rsync to $server:$target_dir/test/'
echo '* Starting rsync to $server:$target_dir/test/'
rsync -v --dry-run \
-r --delete \
--fileter "P log/*.log" --filter "P log/*.html" \
--filter "P log/*.log" --filter "P log/*.html" \
--include ".htaccess" --exclude-from exclude.txt \
$current_dir/ "$current_dir/moved/"
# $current_dir/ "$server:$target_dir/test/"
"." "moved/"
# . "$server:$target_dir/test/"
rm exclude.txt
# unset maintenance mode
rsync -v --dry-run \
"$server:$remote_dir/www/index.php $current_dir/temp/"
echo '* unsetting maintenance mode on remote app'
sed -i "s/\s*require '.maintenance.php';/\/\/ require '.maintenance.php';/" index.php
rsync -v --dry-run \
$current_dir/temp/index.php "$server:$remote_dir/www/"
temp/index.php "$server:$remote_dir/www/"
rm temp/index.php
// Uncomment this line if you must temporarily take down your site for maintenance.
require '.maintenance.php';
// require '.maintenance.php';
// Let bootstrap create Dependency Injection container.
$container = require __DIR__ . '/../app/bootstrap.php';
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment