Check that the gogs database template exists

This commit is contained in:
Bob Mottram 2016-05-10 08:23:37 +01:00
parent 73c0ab32ed
commit c5c690b47d
1 changed files with 4 additions and 0 deletions

View File

@ -6553,6 +6553,10 @@ function install_gogs {
fi fi
create_database gogs "$GOGS_ADMIN_PASSWORD" create_database gogs "$GOGS_ADMIN_PASSWORD"
if [ ! -f $GOPATH/src/github.com/gogits/gogs/scripts/mysql.sql ]; then
echo $'MySql template for Gogs was not found'
exit 72528
fi
mysql -u root --password="$MARIADB_PASSWORD" -D gogs < $GOPATH/src/github.com/gogits/gogs/scripts/mysql.sql mysql -u root --password="$MARIADB_PASSWORD" -D gogs < $GOPATH/src/github.com/gogits/gogs/scripts/mysql.sql
chmod 600 $GOPATH/src/github.com/gogits/gogs/custom/conf/app.ini chmod 600 $GOPATH/src/github.com/gogits/gogs/custom/conf/app.ini