Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
These need to be moved out of the gateway tree to better handle upgrades and for data persistence when using Docker.
- Loading branch information
Mike Stegeman
committed
Feb 14, 2018
1 parent
e389b8b
commit 73f8aa3
Showing
19 changed files
with
149 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,16 @@ | ||
#!/bin/bash | ||
|
||
gateway_dir="/home/pi/mozilla-iot/gateway" | ||
MOZIOT_HOME="${MOZIOT_HOME:=/home/pi/mozilla-iot}" | ||
SSL_DIR="${MOZIOT_HOME}/data/ssl" | ||
|
||
# Make sure the certificate and private key files are never world readable. | ||
umask 077 | ||
|
||
# Copy in the new certs. | ||
mkdir -p "${gateway_dir}/ssl" | ||
cp "${RENEWED_LINEAGE}/chain.pem" "${gateway_dir}/ssl/chain.pem" | ||
cp "${RENEWED_LINEAGE}/cert.pem" "${gateway_dir}/ssl/certificate.pem" | ||
cp "${RENEWED_LINEAGE}/privkey.pem" "${gateway_dir}/ssl/privatekey.pem" | ||
[ ! -d "${SSL_DIR}" ] && mkdir -p "${SSL_DIR}" | ||
cp "${RENEWED_LINEAGE}/chain.pem" "${SSL_DIR}/chain.pem" | ||
cp "${RENEWED_LINEAGE}/cert.pem" "${SSL_DIR}/certificate.pem" | ||
cp "${RENEWED_LINEAGE}/privkey.pem" "${SSL_DIR}/privatekey.pem" | ||
|
||
# Restart the gateway. | ||
systemctl restart mozilla-iot-gateway.service |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.