summaryrefslogtreecommitdiffstats
path: root/lava-master
diff options
context:
space:
mode:
authorkhilman <khilman@users.noreply.github.com>2018-07-27 08:22:10 -0500
committerGitHub <noreply@github.com>2018-07-27 08:22:10 -0500
commit61a473fb56ef7418314385df7b72cd58e40a2ff2 (patch)
tree6502b5650c12f630bb6aada9448ca4238b556148 /lava-master
parentd733f2d4280959fed968d1589580f46460ecba27 (diff)
parentb19b71ab89761e801c27038f093d76655efabfbf (diff)
Merge pull request #36 from montjoie/miscfix_07_2018b
Miscfix 07 2018b
Diffstat (limited to 'lava-master')
-rw-r--r--lava-master/Dockerfile2
-rwxr-xr-xlava-master/scripts/setup.sh10
2 files changed, 12 insertions, 0 deletions
diff --git a/lava-master/Dockerfile b/lava-master/Dockerfile
index 100b366..1270e32 100644
--- a/lava-master/Dockerfile
+++ b/lava-master/Dockerfile
@@ -29,6 +29,8 @@ RUN cd /usr/lib/python3/dist-packages && for patch in $(ls /root/lava-patch/*pat
COPY zmq_auth/ /etc/lava-dispatcher/certificates.d/
+COPY lava_http_fqdn /root/
+
EXPOSE 69/udp 80 3079 5555 5556
CMD /start.sh && while [ true ];do sleep 365d; done
diff --git a/lava-master/scripts/setup.sh b/lava-master/scripts/setup.sh
index dd0d58f..426876f 100755
--- a/lava-master/scripts/setup.sh
+++ b/lava-master/scripts/setup.sh
@@ -21,6 +21,12 @@ if [ -e /db_lavaserver ];then
fi
chown -R lavaserver:lavaserver /var/lib/lava-server/default/media/job-output/
+# default site is set as example.com
+if [ -e /root/lava_http_fqdn ];then
+ sudo -u postgres psql lavaserver -c "UPDATE django_site SET name = '$(cat /root/lava_http_fqdn)'" || exit $?
+ sudo -u postgres psql lavaserver -c "UPDATE django_site SET domain = '$(cat /root/lava_http_fqdn)'" || exit $?
+fi
+
if [ -e /root/lava-users ];then
for ut in $(ls /root/lava-users)
do
@@ -52,6 +58,10 @@ if [ -e /root/lava-users ];then
echo "Adding token to user $USER"
lava-server manage tokens add --user $USER --secret $TOKEN || exit 1
fi
+ if [ ! -z "$EMAIL" ];then
+ echo "Adding email to user $USER"
+ lava-server manage users update --email $EMAIL $USER || exit 1
+ fi
fi
done
fi