summaryrefslogtreecommitdiffstats
path: root/lava-master/scripts/setup.sh
diff options
context:
space:
mode:
authorkhilman <khilman@users.noreply.github.com>2018-07-23 09:32:40 -0500
committerGitHub <noreply@github.com>2018-07-23 09:32:40 -0500
commitef276f04512f1808ae7e9fbb2e3b904855486462 (patch)
tree28b055619917fbc254a59586bc6e47d84cf0bf2f /lava-master/scripts/setup.sh
parent45f76344b4278f1ecf9956f3a81bfe11cd525c43 (diff)
parentd42030d39800b930634dba1efafcf43959c40205 (diff)
Merge pull request #33 from montjoie/zmq_auth
Zmq auth
Diffstat (limited to 'lava-master/scripts/setup.sh')
-rwxr-xr-xlava-master/scripts/setup.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/lava-master/scripts/setup.sh b/lava-master/scripts/setup.sh
index 6ab0663..c7807dc 100755
--- a/lava-master/scripts/setup.sh
+++ b/lava-master/scripts/setup.sh
@@ -118,3 +118,12 @@ do
lava-server manage devices add --device-type $devicetype --worker $worker $devicename || exit $?
done
done
+
+if [ -e /etc/lava-dispatcher/certificates.d/$(hostname).key ];then
+ echo "INFO: Enabling encryption"
+ sed -i 's,.*ENCRYPT=.*,ENCRYPT="--encrypt",' /etc/lava-server/lava-master || exit $?
+ sed -i 's,.*MASTER_CERT=.*,MASTER_CERT="--master-cert /etc/lava-dispatcher/certificates.d/$(hostname).key_secret",' /etc/lava-server/lava-master || exit $?
+ sed -i 's,.*ENCRYPT=.*,ENCRYPT="--encrypt",' /etc/lava-server/lava-logs || exit $?
+ sed -i 's,.*MASTER_CERT=.*,MASTER_CERT="--master-cert /etc/lava-dispatcher/certificates.d/$(hostname).key_secret",' /etc/lava-server/lava-logs || exit $?
+fi
+exit 0