-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.sh
executable file
·45 lines (42 loc) · 1.06 KB
/
configure.sh
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
#!/bin/bash
set -eo pipefail
BASEDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
CONFIG=$BASEDIR/.env
echo "What hostname do you want to run the app on?"
read HOST
echo "What port do you want to run the listener on?"
read PORT
echo "What is the hash length?"
read HASH_LENGTH
echo "What is the hash salt?"
read HASH_SALT
echo "Firebase JSON key path?"
read FB_KEY_PATH
echo "Firebase database ID?"
read FB_URL
echo "Twilio account SID?"
read TWILIO_ACCOUNT_SID
echo "Twilio auth token?"
read TWILIO_AUTH_TOKEN
echo "Twilio phone number?"
read TWILIO_PHONE_NUMBER
echo "SendGrid API Key?"
read SENDGRID_API_KEY
echo "SendGrid email?"
read SENDGRID_EMAIL
echo "What is the Imgur Client ID?"
read IMGUR_CLIENT_ID
cat <<EOF > $CONFIG
HOSTNAME=$HOST
PORT=$PORT
HASH_LENGTH=$HASH_LENGTH
HASH_SALT=$HASH_SALT
FIREBASE_KEY_PATH=$FB_KEY_PATH
FIREBASE_ID=$FB_URL
IMGUR_CLIENT_ID=$IMGUR_CLIENT_ID
TWILIO_ACCOUNT_SID=$TWILIO_ACCOUNT_SID
TWILIO_AUTH_TOKEN=$TWILIO_AUTH_TOKEN
TWILIO_PHONE_NUMBER=$TWILIO_PHONE_NUMBER
SENDGRID_API_KEY=$SENDGRID_API_KEY
SENDGRID_EMAIL=$SENDGRID_EMAIL
EOF