Files
tlsn/cd-scripts/modify_proxy.sh
ntampakas 173945dd0a Deployment of multiple stable versions (#459)
* Remove cargo/bin from PATH

* Modify script to run only in nightly env

* Modify script to stop the oldest version in stable env

* Modify script to support dir preparation for the 3 latest stable versions

* Modify script to start service for the 3 latest stable versions

* Modify sercice validation script

* Create proxy modification script

* Add step in workflow to enable ssm execution against proxy + aux script

* Add running state filter when fetching InstanceID

* Enhancement of validation script

* Modify bash behavior

* Point tags/deployment to new AWS resources

* Change GH owner to production one

* Point tags to new EC2 v1

* Move all cd scripts to a new folder

* Add comment

* Add comment

* Add comment

* Add comment

* Modify scripts to support exit on error

* Check if all stable ports are in use and terminate
2024-03-29 11:10:18 +08:00

15 lines
412 B
Bash
Executable File

#!/bin/bash
# This script is executed on proxy side, in order to assign the available port to latest stable version
set -e
PORT=$1
VERSION=$2
sed -i "/# Port $PORT/{n;s/v[0-9].[0-9].[0-9]-[a-z]*.[0-9]*/$VERSION/g}" /etc/nginx/sites-available/tlsnotary-pse
sed -i "/# Port $PORT/{n;n;s/v[0-9].[0-9].[0-9]-[a-z]*.[0-9]*/$VERSION/g}" /etc/nginx/sites-available/tlsnotary-pse
nginx -t
nginx -s reload
exit 0