Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create Update-Timezone-AGIXT.sh (#1106)
Script to update the timezone in specified AGiXT Docker Compose files to the current server timezone. # Explanation of the script: # Determine Current Timezone: # Use timedatectl to retrieve information about the current server timezone. # awk extracts the timezone information from the output. # Function to Replace Timezone: # Define a function replace_timezone that takes a file as an argument and uses sed to replace the timezone pattern in the file. # The pattern TZ=${TZ-[^}]*} matches strings like TZ=${TZ-America/New_York} or similar. # Array of Files: # Create an array compose_files containing the names of Docker Compose files to be updated. # Update Each File: # Iterate through the array of files and call the replace_timezone function for each file. # Display Success Message: # Print a message indicating that the timezone in the files has been successfully updated to the current server timezone. # This script ensures that the timezone pattern in the specified Docker Compose files is replaced with the current server timezone. Signed-off-by: pegas07770 <[email protected]> Co-authored-by: pegas07770 <[email protected]> Co-authored-by: Josh XT <[email protected]>
- Loading branch information