-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathentrypoint.sh
More file actions
executable file
·46 lines (39 loc) · 871 Bytes
/
Copy pathentrypoint.sh
File metadata and controls
executable file
·46 lines (39 loc) · 871 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/bin/bash
# Define the output file
OUTPUT_FILE=".env"
# Define the required environment variables
REQUIRED_VARS=(
"OWNER_PUBKEY"
)
# Define the all environment variables
ALL_VARS=(
"OWNER_PUBKEY"
"RELAY_NAME"
"RELAY_DESCRIPTION"
"RELAY_URL"
"RELAY_ICON"
"RELAY_CONTACT"
"DB_PATH"
"REFRESH_INTERVAL"
"MIN_FOLLOWERS"
"POW_WHITELIST"
"POW_DM_WHITELIST"
"FETCH_ALL_INTERACTIONS"
"BLOSSOM_BACKUP_MEDIA"
"BLOSSOM_ASSETS_PATH"
"SKIP_DELETIONS"
)
# Check if all required environment variables are set
for var in "${REQUIRED_VARS[@]}"; do
if [ -z "${!var}" ]; then
echo "Error: Environment variable $var is not set."
exit 1
fi
done
#Recreate conf file
truncate -s 0 $OUTPUT_FILE
# Write environment variables to the output file
for var in "${ALL_VARS[@]}"; do
echo "$var=`printenv ${var}`" >> "$OUTPUT_FILE"
done
./chronicle