Populate the gogs database
This commit is contained in:
parent
81eebcb0c7
commit
73c0ab32ed
|
@ -6528,25 +6528,11 @@ function install_gogs {
|
||||||
echo '' >> /home/$MY_USERNAME/README
|
echo '' >> /home/$MY_USERNAME/README
|
||||||
echo 'Gogs' >> /home/$MY_USERNAME/README
|
echo 'Gogs' >> /home/$MY_USERNAME/README
|
||||||
echo '====' >> /home/$MY_USERNAME/README
|
echo '====' >> /home/$MY_USERNAME/README
|
||||||
echo $'Database type: MySql' >> /home/$MY_USERNAME/README
|
|
||||||
echo $'Database host: 127.0.0.1:3306' >> /home/$MY_USERNAME/README
|
|
||||||
echo $'Database user: root' >> /home/$MY_USERNAME/README
|
|
||||||
echo $"Database password: $MARIADB_PASSWORD" >> /home/$MY_USERNAME/README
|
|
||||||
echo $'Database name: gogs' >> /home/$MY_USERNAME/README
|
|
||||||
echo $'Gogs admin user: gogsadmin' >> /home/$MY_USERNAME/README
|
|
||||||
echo $"Gogs admin user password: $GIT_ADMIN_PASSWORD" >> /home/$MY_USERNAME/README
|
|
||||||
echo $"Gogs admin user email: $MY_EMAIL_ADDRESS" >> /home/$MY_USERNAME/README
|
|
||||||
echo '' >> /home/$MY_USERNAME/README
|
|
||||||
echo $'Install Steps For First-time Run:' >> /home/$MY_USERNAME/README
|
echo $'Install Steps For First-time Run:' >> /home/$MY_USERNAME/README
|
||||||
echo $'Leave email service settings empty' >> /home/$MY_USERNAME/README
|
echo $'Leave email service settings empty' >> /home/$MY_USERNAME/README
|
||||||
echo $'Check "Enable Register Confirmation"' >> /home/$MY_USERNAME/README
|
echo $'Check "Enable Register Confirmation"' >> /home/$MY_USERNAME/README
|
||||||
echo $'Check "Enable Mail Notification"' >> /home/$MY_USERNAME/README
|
echo $'Check "Enable Mail Notification"' >> /home/$MY_USERNAME/README
|
||||||
echo '' >> /home/$MY_USERNAME/README
|
echo '' >> /home/$MY_USERNAME/README
|
||||||
echo $"After the initial install edit ${GOPATH}/src/github.com/gogits/gogs/custom/conf/app.ini" >> /home/$MY_USERNAME/README
|
|
||||||
echo $'and within the [server] section set:' >> /home/$MY_USERNAME/README
|
|
||||||
echo " DOMAIN = $GIT_DOMAIN_NAME" >> /home/$MY_USERNAME/README
|
|
||||||
echo " ROOT_URL = http://$GIT_DOMAIN_NAME/" >> /home/$MY_USERNAME/README
|
|
||||||
echo " SSH_PORT = $SSH_PORT" >> /home/$MY_USERNAME/README
|
|
||||||
echo $'If you want to disable new account registrations then append the following:' >> /home/$MY_USERNAME/README
|
echo $'If you want to disable new account registrations then append the following:' >> /home/$MY_USERNAME/README
|
||||||
echo ' [service]' >> /home/$MY_USERNAME/README
|
echo ' [service]' >> /home/$MY_USERNAME/README
|
||||||
echo ' DISABLE_REGISTRATION = true' >> /home/$MY_USERNAME/README
|
echo ' DISABLE_REGISTRATION = true' >> /home/$MY_USERNAME/README
|
||||||
|
@ -6567,6 +6553,7 @@ function install_gogs {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
create_database gogs "$GOGS_ADMIN_PASSWORD"
|
create_database gogs "$GOGS_ADMIN_PASSWORD"
|
||||||
|
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
|
||||||
|
|
||||||
|
@ -6753,6 +6740,8 @@ function install_gogs {
|
||||||
|
|
||||||
chown -R git:git /home/git
|
chown -R git:git /home/git
|
||||||
|
|
||||||
|
systemctl restart gogs
|
||||||
|
|
||||||
if ! grep -q "Gogs domain:" $COMPLETION_FILE; then
|
if ! grep -q "Gogs domain:" $COMPLETION_FILE; then
|
||||||
echo "Gogs domain:$GIT_DOMAIN_NAME" >> $COMPLETION_FILE
|
echo "Gogs domain:$GIT_DOMAIN_NAME" >> $COMPLETION_FILE
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue