Skip to content

Commit 3582274

Browse files
rfac: hardcode env
1 parent 03ea065 commit 3582274

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

src/backend/shell_scripts/automate.sh

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22

33
# This script takes in 3 command line arguments
44

5-
FULLCHAIN_LOCATION=$(cat ../.env | grep FULLCHAIN_LOCATION= | cut -d '=' -f2)
6-
PRIVKEY_LOCATION=$(cat ../.env | grep PRIVKEY_LOCATION= | cut -d '=' -f2)
7-
85
# Check if the number of arguments is correct
96
id -u
107
if [ "$#" -ne 3 ]; then
@@ -65,8 +62,8 @@ elif [ "$arg1" = "-p" ]; then
6562
}
6663
charset utf-8;
6764
client_max_body_size 20M;
68-
ssl_certificate $FULLCHAIN_LOCATION;
69-
ssl_certificate_key $PRIVKEY_LOCATION;
65+
ssl_certificate /etc/letsencrypt/live/domains.mdgspace.org-0002/fullchain.pem;
66+
ssl_certificate_key /etc/letsencrypt/live/domains.mdgspace.org-0002/privkey.pem;
7067
include /etc/letsencrypt/options-ssl-nginx.conf;
7168
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
7269
}" > /etc/nginx/sites-available/$arg3.conf;

src/backend/shell_scripts/container.sh

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ resource=$3
66
exp_port=$4
77
max_mem=$5
88

9-
FULLCHAIN_LOCATION=$(cat ../.env | grep FULLCHAIN_LOCATION= | cut -d '=' -f2)
10-
PRIVKEY_LOCATION=$(cat ../.env | grep PRIVKEY_LOCATION= | cut -d '=' -f2)
11-
129
available_ports=()
1310

1411
for ((port=PORT_MIN; port<=PORT_MAX; port++)); do
@@ -58,8 +55,8 @@ sudo echo "# Virtual Host configuration for $2
5855
}
5956
charset utf-8;
6057
client_max_body_size 20M;
61-
ssl_certificate $FULLCHAIN_LOCATION;
62-
ssl_certificate_key $PRIVKEY_LOCATION;
58+
ssl_certificate /etc/letsencrypt/live/domains.mdgspace.org-0002/fullchain.pem;
59+
ssl_certificate_key /etc/letsencrypt/live/domains.mdgspace.org-0002/privkey.pem;
6360
include /etc/letsencrypt/options-ssl-nginx.conf;
6461
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
6562
}" > /etc/nginx/sites-available/$2.conf

0 commit comments

Comments
 (0)