diff --git a/src/freedombone-app-gogs b/src/freedombone-app-gogs index 4c102ced..1efe954b 100755 --- a/src/freedombone-app-gogs +++ b/src/freedombone-app-gogs @@ -158,7 +158,8 @@ function upgrade_gogs { return fi - GOGS_CONFIG_FILE=/home/${GOGS_USERNAME}/custom/conf/app.ini + 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 gogs_parameters @@ -199,7 +200,15 @@ function upgrade_gogs { rm ${GOGS_FILE} fi + if [ ! -d ${GOGS_CONFIG_PATH} ]; then + mkdir -p ${GOGS_CONFIG_PATH} + fi + cp $INSTALL_DIR/gogs_config.ini $GOGS_CONFIG_FILE + if [ ! -f $GOGS_CONFIG_FILE ]; then + echo $'Gogs ini file not upgraded' + exit 873535 + fi rm $INSTALL_DIR/gogs_config.ini sed -i "s|gogs version.*|gogs version:$GOGS_VERSION|g" ${COMPLETION_FILE}