mirror of
				https://github.com/Telecominfraproject/ols-nos.git
				synced 2025-10-31 01:57:48 +00:00 
			
		
		
		
	 f978b2bb53
			
		
	
	f978b2bb53
	
	
	
		
			
			#### Why I did it To fix the timezone sync issue between the containers and the host. If a certain timezone has been configured on the host (SONIC) then the expectation is to reflect the same across all the containers. This will fix [Issue:13046](https://github.com/sonic-net/sonic-buildimage/issues/13046). For instance, a PST timezone has been set on the host and if the user checks the link flap logs (inside the FRR), it shows the UTC timestamp. Ideally, it should be PST.
		
			
				
	
	
		
			14 lines
		
	
	
		
			415 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			14 lines
		
	
	
		
			415 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
| #!/usr/bin/env bash
 | |
| 
 | |
| # Generate supervisord config file
 | |
| mkdir -p /etc/supervisor/conf.d/
 | |
| 
 | |
| TZ=$(cat /etc/timezone)
 | |
| rm -rf /etc/localtime
 | |
| ln -sf /usr/share/zoneinfo/$TZ /etc/localtime
 | |
| 
 | |
| # The docker container should start this script as PID 1, so now that supervisord is
 | |
| # properly configured, we exec supervisord so that it runs as PID 1 for the
 | |
| # duration of the container's lifetime
 | |
| exec /usr/local/bin/supervisord
 |