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

Manage gogs config file during upgrades

parent 60289687
No related branches found
No related tags found
No related merge requests found
......@@ -146,6 +146,9 @@ function upgrade_gogs {
return
fi
GOGS_CONFIG_FILE=/home/${GOGS_USERNAME}/custom/conf/app.ini
cp $GOGS_CONFIG_FILE $INSTALL_DIR/gogs_config.ini
gogs_parameters
echo "gogs binary upgrade: ${GOGS_BIN}"
......@@ -184,6 +187,9 @@ function upgrade_gogs {
rm ${GOGS_FILE}
fi
cp $INSTALL_DIR/gogs_config.ini $GOGS_CONFIG_FILE
rm $INSTALL_DIR/gogs_config.ini
sed -i "s|gogs version.*|gogs version:$GOGS_VERSION|g" ${COMPLETION_FILE}
systemctl restart gogs
}
......
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