Skip to content

Instantly share code, notes, and snippets.

@itechGroup
Created April 14, 2011 06:18
Show Gist options
  • Save itechGroup/918984 to your computer and use it in GitHub Desktop.
Save itechGroup/918984 to your computer and use it in GitHub Desktop.
Скрипт по распаковке сайтов на cms Bitrix запакованных для системы контроля версий
if test -z $1
then
echo "$0 : You must set a project name"
exit 1
else
if test -d /srv/sites/$1/www/
then
#start process
cd /srv/sites/$1/www/
#untar upload
/bin/tar -xf upload.tar.bz2 -C ./
#untar bitrix system dirs
/bin/tar -xf bitrix.tar.bz2 -C ./
#copy config
cp /srv/sites/$1/www/bitrix/php_interface/dbconn.distr.php /srv/sites/$1/www/bitrix/php_interface/dbconn.php
#fixing permisions
cd /srv/sites/$1/www/
chgrp -R apache *
chmod -R 775 *
else
echo "There is no such a project"
exit 1
fi
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment