Fix PWD issue for backups being in non-permissive directory.
This commit is contained in:
parent
57bac39365
commit
c8fc9310c7
1 changed files with 2 additions and 0 deletions
|
@ -62,7 +62,9 @@ runBackups() {
|
|||
|
||||
backupDate=$(date +"%Y-%m-%d")
|
||||
giteaHome=$(getent passwd git | cut -f6 -d:)
|
||||
pushd "${giteaDir}" &>/dev/null
|
||||
sudo -u "$GITEA_USER" "${GITEA_BIN}" dump --config "${GITEA_CONFIG}" --type tar.xz --file - > "${giteaDir}/gitea-dump-${backupDate}.tar.xz"
|
||||
popd &>/dev/null
|
||||
}
|
||||
|
||||
hook_before() {
|
||||
|
|
Loading…
Reference in a new issue