Change gogs port number
This commit is contained in:
parent
a4b1a7903d
commit
e1a877eb67
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue