Skip to content
Snippets Groups Projects
Commit e1a877eb authored by Bob Mottram's avatar Bob Mottram
Browse files

Change gogs port number

parent a4b1a790
No related branches found
No related tags found
No related merge requests found
......@@ -150,6 +150,18 @@ function upgrade_gogs {
return
fi
GOGS_CONFIG_PATH=/home/${GOGS_USERNAME}/custom/conf
GOGS_CONFIG_FILE=$GOGS_CONFIG_PATH/app.ini
# Change port number if necessary
if ! grep -q "HTTP_PORT = ${GOGS_PORT}" "${GOGS_CONFIG_FILE}"; then
sed -i "s|HTTP_PORT =.*|HTTP_PORT = ${GOGS_PORT}|g" "${GOGS_CONFIG_FILE}"
read_config_param GIT_DOMAIN_NAME
sed -i "s|proxy_pass .*|proxy_pass http://localhost:${GOGS_PORT};|g" "/etc/nginx/sites-available/${GIT_DOMAIN_NAME}"
systemctl restart gogs
systemctl restart nginx
fi
CURR_GOGS_VERSION=$(get_completion_param "gogs version")
echo "gogs current version: ${CURR_GOGS_VERSION}"
echo "gogs app version: ${GOGS_VERSION}"
......@@ -157,8 +169,6 @@ function upgrade_gogs {
return
fi
GOGS_CONFIG_PATH=/home/${GOGS_USERNAME}/custom/conf
GOGS_CONFIG_FILE=$GOGS_CONFIG_PATH/app.ini
cp "$GOGS_CONFIG_FILE $INSTALL_DIR/gogs_config.ini"
if [ -d "$INSTALL_DIR/gogs-repositories" ]; then
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment