autoface commited on
Commit
fb4f47d
·
1 Parent(s): 5b0a02b

Update docker-entrypoint.sh to load the service configuration to ensure consistent startup behavior. Add load logic for restic and persistence configurations and update AWS configuration item comment format in restic.conf.

Browse files
Files changed (2) hide show
  1. configs/restic.conf +3 -3
  2. docker-entrypoint.sh +25 -0
configs/restic.conf CHANGED
@@ -214,9 +214,9 @@ RESTIC_PROGRESS="true"
214
  # =============================================================================
215
 
216
  # S3 Configuration
217
- # RESTIC_AWS_ACCESS_KEY_ID=""
218
- # RESTIC_AWS_SECRET_ACCESS_KEY=""
219
- # RESTIC_AWS_DEFAULT_REGION="us-east-1"
220
  # RESTIC_S3_STORAGE_CLASS="STANDARD" # STANDARD, STANDARD_IA, GLACIER, etc.
221
 
222
  # SFTP Configuration
 
214
  # =============================================================================
215
 
216
  # S3 Configuration
217
+ # AWS_ACCESS_KEY_ID=""
218
+ # AWS_SECRET_ACCESS_KEY=""
219
+ # AWS_DEFAULT_REGION="us-east-1"
220
  # RESTIC_S3_STORAGE_CLASS="STANDARD" # STANDARD, STANDARD_IA, GLACIER, etc.
221
 
222
  # SFTP Configuration
docker-entrypoint.sh CHANGED
@@ -206,6 +206,31 @@ check_backup_service_conflicts() {
206
  fi
207
  }
208
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
209
  # Display service status summary
210
  log "Service configuration:"
211
  for script in "$start_dir"/*-start.sh; do
 
206
  fi
207
  }
208
 
209
+ # Load service configurations to ensure consistency with actual startup behavior
210
+ load_service_configs() {
211
+ # Load restic config if exists (same logic as in perform_restic_restore)
212
+ local user_home="${HOME:-/home/user}"
213
+ local restic_config="$user_home/config/restic.conf"
214
+ if [[ -f "$restic_config" ]]; then
215
+ local temp_config="/tmp/restic_config_display_$$"
216
+ sed 's/^\([^#]*\)=\(.*\)$/\1=${\1:-\2}/' "$restic_config" > "$temp_config"
217
+ source "$temp_config"
218
+ rm -f "$temp_config"
219
+ fi
220
+
221
+ # Load persistence config if exists
222
+ local persistence_config="$user_home/config/persistence.conf"
223
+ if [[ -f "$persistence_config" ]]; then
224
+ local temp_config="/tmp/persistence_config_display_$$"
225
+ sed 's/^\([^#]*\)=\(.*\)$/\1=${\1:-\2}/' "$persistence_config" > "$temp_config"
226
+ source "$temp_config"
227
+ rm -f "$temp_config"
228
+ fi
229
+ }
230
+
231
+ # Load service configurations first
232
+ load_service_configs
233
+
234
  # Display service status summary
235
  log "Service configuration:"
236
  for script in "$start_dir"/*-start.sh; do