Check that gogs ini file gets copied on upgrade
This commit is contained in:
parent
ceaceb4c3d
commit
70f7e73974
|
@ -158,7 +158,8 @@ function upgrade_gogs {
|
||||||
return
|
return
|
||||||
fi
|
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
|
cp $GOGS_CONFIG_FILE $INSTALL_DIR/gogs_config.ini
|
||||||
|
|
||||||
gogs_parameters
|
gogs_parameters
|
||||||
|
@ -199,7 +200,15 @@ function upgrade_gogs {
|
||||||
rm ${GOGS_FILE}
|
rm ${GOGS_FILE}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ ! -d ${GOGS_CONFIG_PATH} ]; then
|
||||||
|
mkdir -p ${GOGS_CONFIG_PATH}
|
||||||
|
fi
|
||||||
|
|
||||||
cp $INSTALL_DIR/gogs_config.ini $GOGS_CONFIG_FILE
|
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
|
rm $INSTALL_DIR/gogs_config.ini
|
||||||
|
|
||||||
sed -i "s|gogs version.*|gogs version:$GOGS_VERSION|g" ${COMPLETION_FILE}
|
sed -i "s|gogs version.*|gogs version:$GOGS_VERSION|g" ${COMPLETION_FILE}
|
||||||
|
|
Loading…
Reference in New Issue