Skip to content

Commit d7b26de

Browse files
committed
no sudo test
1 parent 6d466c1 commit d7b26de

File tree

3 files changed

+16
-16
lines changed

3 files changed

+16
-16
lines changed

.github/workflows/ami.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
TAG="${GITHUB_REF#refs/tags/}"
1818
CORE_VERSION=$(echo $TAG | sed 's/.*c-\([^_]*\).*/\1/')
1919
PROXY_VERSION=$(echo $TAG | sed 's/.*px-\([^_]*\).*/\1/')
20-
GATEWAY_VERSION=$(echo $TAG | sed 's/.*gw-\(.*\)/\1/')
20+
GATEWAY_VERSION=$(echo $TAG | sed 's/.*gw-\([^_]*\).*/\1/')
2121
echo "CORE_VERSION=$CORE_VERSION" >> $GITHUB_OUTPUT
2222
echo "PROXY_VERSION=$PROXY_VERSION" >> $GITHUB_OUTPUT
2323
echo "GATEWAY_VERSION=$GATEWAY_VERSION" >> $GITHUB_OUTPUT

cloudformation/ami/defguard-install.sh

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,36 +2,36 @@
22
set -e
33

44
echo "Updating apt repositories..."
5-
sudo apt update
5+
apt update
66

77
echo "Installing dependencies..."
8-
sudo apt install -y ca-certificates curl awscli
8+
apt install -y ca-certificates curl awscli
99

1010
echo "Adding Defguard GPG key..."
11-
sudo install -m 0755 -d /etc/apt/keyrings
12-
sudo curl -fsSL https://apt.defguard.net/defguard.asc -o /etc/apt/keyrings/defguard.asc
13-
sudo chmod a+r /etc/apt/keyrings/defguard.asc
11+
install -m 0755 -d /etc/apt/keyrings
12+
curl -fsSL https://apt.defguard.net/defguard.asc -o /etc/apt/keyrings/defguard.asc
13+
chmod a+r /etc/apt/keyrings/defguard.asc
1414

1515
echo "Adding Defguard repository..."
1616
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/defguard.asc] https://apt.defguard.net/ trixie release " | \
17-
sudo tee /etc/apt/sources.list.d/defguard.list > /dev/null
17+
tee /etc/apt/sources.list.d/defguard.list > /dev/null
1818

1919
echo "Updating apt repositories after adding Defguard repo..."
20-
sudo apt update
20+
apt update
2121

2222
echo "Installing Defguard packages with specific versions..."
2323
echo " defguard version: ${CORE_VERSION}"
2424
echo " defguard-proxy version: ${PROXY_VERSION}"
2525
echo " defguard-gateway version: ${GATEWAY_VERSION}"
2626

27-
sudo apt install -y \
27+
apt install -y \
2828
defguard=${CORE_VERSION} \
2929
defguard-proxy=${PROXY_VERSION} \
3030
defguard-gateway=${GATEWAY_VERSION}
3131

32-
sudo systemctl stop defguard
33-
sudo systemctl disable defguard
34-
sudo systemctl stop defguard-proxy
35-
sudo systemctl disable defguard-proxy
36-
sudo systemctl stop defguard-gateway
37-
sudo systemctl disable defguard-gateway
32+
systemctl stop defguard
33+
systemctl disable defguard
34+
systemctl stop defguard-proxy
35+
systemctl disable defguard-proxy
36+
systemctl stop defguard-gateway
37+
systemctl disable defguard-gateway

cloudformation/ami/defguard.pkr.hcl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ variable "instance_type" {
3030
}
3131

3232
source "amazon-ebs" "defguard" {
33-
ami_name = "defguard-C-${var.core_version}-PX-${var.gateway_version}-GW-${var.proxy_version}-amd64"
33+
ami_name = "defguard-C-${var.core_version}-PX-${var.gateway_version}-GW-${var.proxy_version}-amd64-{{timestamp}}"
3434
instance_type = var.instance_type
3535
region = var.region
3636
source_ami_filter {

0 commit comments

Comments
 (0)