|
37 | 37 |
|
38 | 38 | # uncomment default ssl settings
|
39 | 39 | replace configuration/stf-proxy/nginx.conf "# ssl_" " ssl_"
|
40 |
| - fi |
41 | 40 |
|
| 41 | + #136 made ssl.crt and ssl.key not under source control |
| 42 | + if [[ ! -f configuration/stf-proxy/ssl/ssl.crt ]]; then |
| 43 | + echo "using self-signed certificate..." |
| 44 | + cp configuration/stf-proxy/ssl/ssl.crt.original configuration/stf-proxy/ssl/ssl.crt |
| 45 | + fi |
| 46 | + if [[ ! -f configuration/stf-proxy/ssl/ssl.key ]]; then |
| 47 | + echo "using self-signed key..." |
| 48 | + cp configuration/stf-proxy/ssl/ssl.key.original configuration/stf-proxy/ssl/ssl.key |
| 49 | + fi |
| 50 | + fi |
42 | 51 |
|
43 | 52 | # export all ZBR* variables to save user input
|
44 | 53 | export_settings
|
|
104 | 113 | cp configuration/stf-proxy/nginx.conf configuration/stf-proxy/nginx.conf.bak
|
105 | 114 | cp configuration/stf-proxy/htpasswd/mcloud.htpasswd configuration/stf-proxy/htpasswd/mcloud.htpasswd.bak
|
106 | 115 |
|
| 116 | + if [[ -f configuration/stf-proxy/ssl/ssl.crt ]]; then |
| 117 | + cp configuration/stf-proxy/ssl/ssl.crt configuration/stf-proxy/ssl/ssl.crt.bak |
| 118 | + fi |
| 119 | + if [[ -f configuration/stf-proxy/ssl/ssl.key ]]; then |
| 120 | + cp configuration/stf-proxy/ssl/ssl.key configuration/stf-proxy/ssl/ssl.key.bak |
| 121 | + fi |
| 122 | + |
107 | 123 | docker run --rm --volumes-from rethinkdb -v "$(pwd)"/backup:/var/backup "ubuntu" tar -czvf /var/backup/rethinkdb.tar.gz /data
|
108 | 124 | }
|
109 | 125 |
|
|
119 | 135 | cp configuration/stf-proxy/nginx.conf.bak configuration/stf-proxy/nginx.conf
|
120 | 136 | cp configuration/stf-proxy/htpasswd/mcloud.htpasswd.bak configuration/stf-proxy/htpasswd/mcloud.htpasswd
|
121 | 137 |
|
| 138 | + if [[ -f configuration/stf-proxy/ssl/ssl.crt.bak ]]; then |
| 139 | + cp configuration/stf-proxy/ssl/ssl.crt.bak configuration/stf-proxy/ssl/ssl.crt |
| 140 | + fi |
| 141 | + if [[ -f configuration/stf-proxy/ssl/ssl.key.bak ]]; then |
| 142 | + cp configuration/stf-proxy/ssl/ssl.key.bak configuration/stf-proxy/ssl/ssl.key |
| 143 | + fi |
| 144 | + |
122 | 145 | docker run --rm --volumes-from rethinkdb -v "$(pwd)"/backup:/var/backup "ubuntu" bash -c "cd / && tar -xzvf /var/backup/rethinkdb.tar.gz"
|
123 | 146 | down
|
124 | 147 | }
|
|
0 commit comments