fix(worker/mailcow): fixed path and added error message to output
Build and Deploy / build-docker (push) Successful in 4m10s Details

This commit is contained in:
antifallobst 2023-12-17 21:21:34 +01:00
parent 6060292d9f
commit 5e95f37c12
Signed by: antifallobst
GPG Key ID: 2B4F402172791BAF
1 changed files with 2 additions and 2 deletions

View File

@ -65,14 +65,14 @@ fn perform_backup(backup: backup::Backup) -> Result<()> {
create_dir_all(&tmp)?; create_dir_all(&tmp)?;
let status = Command::new("bash") let status = Command::new("bash")
.arg(format!("{dir}/helper-scripts/backup_and_restore.sh")) .arg(format!("{dir}helper-scripts/backup_and_restore.sh"))
.arg("backup") .arg("backup")
.arg("all") .arg("all")
.env("MAILCOW_BACKUP_LOCATION", &tmp) .env("MAILCOW_BACKUP_LOCATION", &tmp)
.status()?; .status()?;
if !status.success() { if !status.success() {
return Err(Error::msg("Failed to create mailcow backup}")); bail!("Failed to create mailcow backup: {}", status);
} }
add_dir_to_archive(&mut archive, &Path::new(&tmp), "mailcow", options)?; add_dir_to_archive(&mut archive, &Path::new(&tmp), "mailcow", options)?;