|
2 | 2 | set -e |
3 | 3 |
|
4 | 4 | echo "Updating apt repositories..." |
5 | | -sudo apt update |
| 5 | +apt update |
6 | 6 |
|
7 | 7 | echo "Installing dependencies..." |
8 | | -sudo apt install -y ca-certificates curl awscli |
| 8 | +apt install -y ca-certificates curl awscli |
9 | 9 |
|
10 | 10 | 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 |
14 | 14 |
|
15 | 15 | echo "Adding Defguard repository..." |
16 | 16 | 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 |
18 | 18 |
|
19 | 19 | echo "Updating apt repositories after adding Defguard repo..." |
20 | | -sudo apt update |
| 20 | +apt update |
21 | 21 |
|
22 | 22 | echo "Installing Defguard packages with specific versions..." |
23 | 23 | echo " defguard version: ${CORE_VERSION}" |
24 | 24 | echo " defguard-proxy version: ${PROXY_VERSION}" |
25 | 25 | echo " defguard-gateway version: ${GATEWAY_VERSION}" |
26 | 26 |
|
27 | | -sudo apt install -y \ |
| 27 | +apt install -y \ |
28 | 28 | defguard=${CORE_VERSION} \ |
29 | 29 | defguard-proxy=${PROXY_VERSION} \ |
30 | 30 | defguard-gateway=${GATEWAY_VERSION} |
31 | 31 |
|
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 |
0 commit comments