diff --git a/src/freedombone-app-gogs b/src/freedombone-app-gogs index 36d4b953..e6cb5087 100755 --- a/src/freedombone-app-gogs +++ b/src/freedombone-app-gogs @@ -13,7 +13,7 @@ # License # ======= # -# Copyright (C) 2014-2016 Bob Mottram +# Copyright (C) 2014-2017 Bob Mottram # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by @@ -279,6 +279,12 @@ function restore_local_gogs { rm -rf ${temp_restore_dir}ssh chown -R ${GOGS_USERNAME}:${GOGS_USERNAME} /home/${GOGS_USERNAME} fi + + GOGS_CONFIG_PATH=/home/${GOGS_USERNAME}/custom/conf + GOGS_CONFIG_FILE=${GOGS_CONFIG_PATH}/app.ini + MARIADB_PASSWORD=$(${PROJECT_NAME}-pass -u root -a mariadb) + sed -i "s|PASSWD =.*|PASSWD = $MARIADB_PASSWORD|g" ${GOGS_CONFIG_FILE} + MARIADB_PASSWORD= fi } @@ -349,6 +355,12 @@ function restore_remote_gogs { chown -R ${GOGS_USERNAME}:${GOGS_USERNAME} /home/${GOGS_USERNAME} echo $"Restore of Gogs complete" fi + + GOGS_CONFIG_PATH=/home/${GOGS_USERNAME}/custom/conf + GOGS_CONFIG_FILE=${GOGS_CONFIG_PATH}/app.ini + MARIADB_PASSWORD=$(${PROJECT_NAME}-pass -u root -a mariadb) + sed -i "s|PASSWD =.*|PASSWD = $MARIADB_PASSWORD|g" ${GOGS_CONFIG_FILE} + MARIADB_PASSWORD= fi }