#!/usr/bin/env sh

if [ ! -z "$TEMPO_GUID" ]; then
  sed -i '/server {/a add_header Set-Cookie "twilight.automation_session_id='$TEMPO_GUID';Domain=$host;Path=/;Max-Age=31536000";' /etc/nginx/nginx.conf
fi

nginx
