forked from faucetsdn/udmi
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into documentation
- Loading branch information
Showing
28 changed files
with
426 additions
and
136 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/bin/bash -eu | ||
|
||
UDMI_ROOT=$(dirname $0)/.. | ||
source $UDMI_ROOT/etc/shell_common.sh | ||
|
||
CERT_DIR=/etc/mosquitto/certs/ | ||
sudo rm -f $CERT_DIR/* | ||
|
||
[[ $# != 1 ]] && fail $0 site_model | ||
|
||
site_model=$(realpath $1) | ||
|
||
cd $UDMI_ROOT | ||
|
||
bin/keygen CA $site_model/reflector | ||
bin/keygen CERT $site_model/reflector | ||
|
||
echo Importing server certs from $site_model... | ||
sudo cp $site_model/reflector/ca.* $CERT_DIR/ | ||
sudo cp $site_model/reflector/rsa_private.* $CERT_DIR/ | ||
sudo chgrp -R mosquitto $CERT_DIR | ||
sudo chmod 0640 $CERT_DIR/rsa_private.* | ||
ls -l $CERT_DIR | ||
|
||
|
||
|
||
|
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
Oops, something went wrong.