forked from sig_core/toolkit
Add chat scripts and update propagation for amis
This commit is contained in:
parent
38e0af2e34
commit
550526f535
2
chat/.gitignore
vendored
Normal file
2
chat/.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
.envrc
|
||||||
|
|
1
chat/common
Normal file
1
chat/common
Normal file
@ -0,0 +1 @@
|
|||||||
|
SERVICE_ID=7mRT77Q5CL2BNpM5zxse2v
|
25
chat/fetch_mattermost_client_release
Executable file
25
chat/fetch_mattermost_client_release
Executable file
@ -0,0 +1,25 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
version=$1
|
||||||
|
|
||||||
|
if [[ -z "$1" ]]; then
|
||||||
|
printf "usage: $0 mmversion\n"; exit 2
|
||||||
|
fi
|
||||||
|
|
||||||
|
#tmpdir=$(mktemp -d)
|
||||||
|
tmpdir=/tmp/
|
||||||
|
outfile="${tmpdir}/mattermost-${version}.tar.gz"
|
||||||
|
|
||||||
|
if [[ ! -f "${outfile}" ]]; then
|
||||||
|
curl -Lo "$outfile" "https://releases.mattermost.com/${version}/mattermost-${version}-linux-amd64.tar.gz" || exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
outdir="${tmpdir}mattermost-${version}/"
|
||||||
|
|
||||||
|
if [[ ! -d "${outdir}" ]]; then
|
||||||
|
mkdir "${outdir}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
tar --strip-components 2 -C "${outdir}" -xvf "$outfile" mattermost/client
|
||||||
|
|
||||||
|
echo "Wrote to ${outdir}"
|
@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
source_ami="$1"
|
source_ami="$1"
|
||||||
source_region="$2"
|
source_region="${2:-us-east-1}"
|
||||||
|
|
||||||
if [[ -z $source_ami || -z $source_region ]]; then
|
if [[ -z $source_ami || -z $source_region ]]; then
|
||||||
echo "usage: $0 source_ami source_region"
|
echo "usage: $0 source_ami source_region"
|
||||||
@ -69,7 +69,7 @@ function change_privacy(){
|
|||||||
aws --profile resf-ami ec2 modify-image-attribute \
|
aws --profile resf-ami ec2 modify-image-attribute \
|
||||||
--region $region \
|
--region $region \
|
||||||
--image-id "${ami_ids[$region]}" \
|
--image-id "${ami_ids[$region]}" \
|
||||||
--launch-permission "${launch_permission}"
|
--launch-permission "${launch_permission}" 2>/dev/null
|
||||||
if [[ $? -eq 0 ]]; then
|
if [[ $? -eq 0 ]]; then
|
||||||
unset ami_ids[$region]
|
unset ami_ids[$region]
|
||||||
echo ". Done"
|
echo ". Done"
|
||||||
@ -119,4 +119,4 @@ function find_image_by_name(){
|
|||||||
|
|
||||||
declare -A ami_ids
|
declare -A ami_ids
|
||||||
copy
|
copy
|
||||||
#change_privacy Public # uses ami_ids
|
change_privacy Public # uses ami_ids
|
||||||
|
Loading…
Reference in New Issue
Block a user