Created
December 12, 2010 07:44
-
-
Save awsfanatic/737915 to your computer and use it in GitHub Desktop.
Скрипт установки Битрикса для ISPmanager
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
COMMAND=$1 | |
DESTFOLDER=$2/$3 | |
DISTFILE=$4 | |
DBHOST=$5 | |
DBNAME=$6 | |
DBUSER=$7 | |
DBPASS=$8 | |
if [ `uname` = 'FreeBSD' ]; then | |
SED="sed -E" | |
else | |
SED="sed -re" | |
fi | |
case $COMMAND in | |
install) | |
TMP=`mktemp -d /tmp/bx.XXXXXX` | |
cd $TMP; | |
trap "cd /; rm -rf $TMP" EXIT | |
tar --extract --gzip --file $DISTFILE || exit 1 | |
find bitrix -maxdepth 1 -mindepth 1 -exec cp -Rf '{}' $DESTFOLDER ';' | |
$SED "s/DBName = '.*';/DBName = '$DBNAME';/;s/DBLogin = '.*';/DBLogin = '$DBUSER';/;s/DBPassword = '.*'/DBPassword = '$DBPASS'/;s/DBHost = '.*'/DBHost = '$DBHOST'/" $DESTFOLDER/bitrix/php_interface/dbconn.php.example > $DESTFOLDER/bitrix/php_interface/dbconn.php | |
;; | |
postinstall) | |
;; | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment