Skip to content

Commit

Permalink
fix issues with non-quoted variables, see #126 (#127)
Browse files Browse the repository at this point in the history
  • Loading branch information
rdxmb authored May 3, 2023
1 parent cd30e27 commit ad8ca31
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions otrs/functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -589,10 +589,7 @@ function setup_backup_cron() {
if [ "${OTRS_BACKUP_TIME}" != "" ] && [ "${OTRS_BACKUP_TIME}" != "disable" ]; then

# Store in a file env vars so they can be sourced from the backup cronjob
printenv | sed 's/^\(.*\)$/export \1/g' | grep -E "^export OTRS_" > /.backup.env
# Remove string quotes
OTRS_BACKUP_TIME="${OTRS_BACKUP_TIME%\"}"
OTRS_BACKUP_TIME="${OTRS_BACKUP_TIME#\"}"
export -p | sed -e "s/\"/'/g" | grep -E "^declare -x OTRS_" > /.backup.env

# Set cron entry
print_info "Setting backup time to: ${OTRS_BACKUP_TIME}"
Expand Down

0 comments on commit ad8ca31

Please sign in to comment.