Use http for onion only systems

This commit is contained in:
Bob Mottram 2016-11-02 21:38:10 +00:00
parent cbcdc1df5a
commit ae780fcea5
1 changed files with 2 additions and 1 deletions

View File

@ -599,11 +599,12 @@ function install_gogs {
echo '[server]' >> ${GOGS_CONFIG_FILE}
if [[ ${ONION_ONLY} == 'no' ]]; then
echo "DOMAIN = ${GIT_DOMAIN_NAME}" >> ${GOGS_CONFIG_FILE}
echo "ROOT_URL = https://$GIT_DOMAIN_NAME/" >> ${GOGS_CONFIG_FILE}
else
echo "DOMAIN = ${GIT_ONION_HOSTNAME}" >> ${GOGS_CONFIG_FILE}
echo "ROOT_URL = http://$GIT_DOMAIN_NAME/" >> ${GOGS_CONFIG_FILE}
fi
echo 'HTTP_PORT = 3000' >> ${GOGS_CONFIG_FILE}
echo "ROOT_URL = https://$GIT_DOMAIN_NAME/" >> ${GOGS_CONFIG_FILE}
echo "SSH_PORT = $SSH_PORT" >> ${GOGS_CONFIG_FILE}
echo 'SSH_DOMAIN = %(DOMAIN)s' >> ${GOGS_CONFIG_FILE}
echo "CERT_FILE = /etc/ssl/certs/${GIT_DOMAIN_NAME}.pem" >> ${GOGS_CONFIG_FILE}