-
Notifications
You must be signed in to change notification settings - Fork 1
/
run.sh
executable file
·77 lines (55 loc) · 1.46 KB
/
run.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#!/bin/bash
# Move to the directory of the script that included this include file ------
export SCRIPT_LOCT=$( cd $( dirname $0 ); pwd )
cd $SCRIPT_LOCT
. dev-scripts/trtl-includes.sh
include_trtl_env_vars settings/trtl-env-var.sh
export_postgres_data_dir $1
# POSTGRES_DATA_DIR
export_turtl_server_data_dir $2
# SERVER_DATA_DIR
export_letsencrypt_dir $3
# LE_DIR
#export TARSNAP_EXPECTED_DIR=$LOCT/settings
#echo
#if [ ! -f $TARSNAP_EXPECTED_DIR/tarsnap.key ]; then
# echo "NOTE: A 'tarsnap.key' file could not be found at $TARSNAP_EXPECTED_DIR/tarsnap.key."
# echo "This is an optional file, but there will be no automatic backup of postgres or turtl data without this key file."
# export TARSNAP_EXPECTED_DIR=
# exit
#else
# echo "A 'tarsnap.key' file was found in the settings/ directory and will be used for postgres/turtl backup."
#fi
set -e
cd $SCRIPT_LOCT
if [ "$( is_certbot_enabled )" == "true" ]; then
echo
echo "* Acquiring/renewing SSL/TLS certificate from Let's Encrypt."
cd certbot-new
./run.sh
cd ..
fi
echo
echo "* Starting Postgres"
cd postgres
./run.sh $POSTGRES_DATA_DIR
cd ..
echo
echo "* Starting Turtl server"
cd turtl-server
./run.sh $SERVER_DATA_DIR
cd ..
if [ "$( is_nginx_enabled )" == "true" ]; then
echo
echo "* Starting nginx"
cd nginx
./run.sh $LE_DIR
cd ..
fi
if [ "$( is_inlets_enabled )" == "true" ]; then
echo
echo "* Starting inlets client"
cd inlets
./run.sh
cd ..
fi