From 79e446f01dc8cc18f50fe2d6be5ff4530d9fe552 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 12 Apr 2017 18:22:39 +0100 Subject: [PATCH] Manage gogs config file during upgrades --- src/freedombone-app-gogs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/freedombone-app-gogs b/src/freedombone-app-gogs index 66b87a99..f0e9aa92 100755 --- a/src/freedombone-app-gogs +++ b/src/freedombone-app-gogs @@ -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 }