Change default login before install

This commit is contained in:
Bob Mottram 2017-05-20 21:52:24 +01:00
parent af10cdfad0
commit 1b58a1cc2b
1 changed files with 8 additions and 8 deletions

View File

@ -337,6 +337,14 @@ function install_movim {
git checkout $MOVIM_COMMIT -b $MOVIM_COMMIT
set_completion_param "movim commit" "$MOVIM_COMMIT"
# default login
if [ ! -f /var/www/$MOVIM_DOMAIN_NAME/htdocs/app/models/config/Config.php ]; then
echo $'Unable to find Config.php'
exit 72352
fi
sed -i "s|'admin'|'${MY_USERNAME}'|g" /var/www/$MOVIM_DOMAIN_NAME/htdocs/app/models/config/Config.php
sed -i "s|'password'|'${MOVIM_ADMIN_PASSWORD}'|g" /var/www/$MOVIM_DOMAIN_NAME/htdocs/app/models/config/Config.php
# curl -sS https://getcomposer.org/installer | php
if [ -f ~/freedombone/image_build/composer_install ]; then
cat ~/freedombone/image_build/composer_install | php
@ -354,14 +362,6 @@ function install_movim {
sed -i "s|'database'.*|'database' => 'movim'|g" db.inc.php
php mud.php db --set
# default login
if [ ! -f /var/www/$MOVIM_DOMAIN_NAME/htdocs/app/models/config/Config.php ]; then
echo $'Unable to find Config.php'
exit 72352
fi
sed -i "s|'admin'|'${MY_USERNAME}'|g" /var/www/$MOVIM_DOMAIN_NAME/htdocs/app/models/config/Config.php
sed -i "s|'password'|'${MOVIM_ADMIN_PASSWORD}'|g" /var/www/$MOVIM_DOMAIN_NAME/htdocs/app/models/config/Config.php
chmod u+rwx /var/www/$MOVIM_DOMAIN_NAME/htdocs
chown -R www-data:www-data /var/www/$MOVIM_DOMAIN_NAME/htdocs