Manage gogs config file during upgrades
This commit is contained in:
parent
60289687f4
commit
79e446f01d
|
@ -146,6 +146,9 @@ function upgrade_gogs {
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
GOGS_CONFIG_FILE=/home/${GOGS_USERNAME}/custom/conf/app.ini
|
||||||
|
cp $GOGS_CONFIG_FILE $INSTALL_DIR/gogs_config.ini
|
||||||
|
|
||||||
gogs_parameters
|
gogs_parameters
|
||||||
echo "gogs binary upgrade: ${GOGS_BIN}"
|
echo "gogs binary upgrade: ${GOGS_BIN}"
|
||||||
|
|
||||||
|
@ -184,6 +187,9 @@ function upgrade_gogs {
|
||||||
rm ${GOGS_FILE}
|
rm ${GOGS_FILE}
|
||||||
fi
|
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}
|
sed -i "s|gogs version.*|gogs version:$GOGS_VERSION|g" ${COMPLETION_FILE}
|
||||||
systemctl restart gogs
|
systemctl restart gogs
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue