Set database password on gogs restore
This commit is contained in:
parent
3fc4f40cd2
commit
f863c21860
|
@ -13,7 +13,7 @@
|
|||
# License
|
||||
# =======
|
||||
#
|
||||
# Copyright (C) 2014-2016 Bob Mottram <bob@freedombone.net>
|
||||
# Copyright (C) 2014-2017 Bob Mottram <bob@freedombone.net>
|
||||
#
|
||||
# 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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue