Commit e75a5f06 authored by Miloš Diviš's avatar Miloš Diviš
Browse files

maintance mode corrected

parent f2857dac
......@@ -6,7 +6,8 @@ server='aaaa'
common_exclude=('*.ssh' '/temp/*' '/log/*' '/nbproject' '/.git' '.gitignore' 'composer.json')
# index.php excluded and send last because of maintenance mode
common_exclude=('*.ssh' '/temp/*' '/log/*' '/nbproject' '/.git' '.gitignore' 'composer.json' '/www/index.php')
current_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
......@@ -22,6 +23,7 @@ sed -i "s/\/\/\s*require '.maintenance.php';/require '.maintenance.php';/" index
rsync -v --dry-run \
"temp/index.php $server:$remote_dir/www/"
rm temp/index.php
# create exclude text file
for i in "${rsync_exclude[@]}"
......@@ -44,11 +46,10 @@ rsync -v --dry-run \
rm exclude.txt
# unset maintenance mode
echo '* unsetting maintenance mode on remote app'
sed -i "s/\s*require '.maintenance.php';/\/\/ require '.maintenance.php';/" index.php
echo '* files uploaded. Sending index.php'
rsync -v --dry-run \
temp/index.php "$server:$remote_dir/www/"
rm temp/index.php
www/index.php "$server:$remote_dir/www/"
echo '* maintance mode off. files uploaded'
Supports Markdown
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