-
Notifications
You must be signed in to change notification settings - Fork 3
/
configure
executable file
·75 lines (60 loc) · 1.71 KB
/
configure
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#!/bin/bash
# ANL:waggle-license
# This file is part of the Waggle Platform. Please see the file
# LICENSE.waggle.txt for the legal details of the copyright and software
# license. For more details on the Waggle project, visit:
# http://www.wa8.gl
# ANL:waggle-license
set -e
CONFIGURE_SYSTEM=0
while [[ $# -gt 0 ]]; do
key="$1"
echo "Key: $key"
case $key in
--system)
CONFIGURE_SYSTEM=1
;;
*)
;;
esac
shift
done
export current_dir="$(pwd)"
if [ $CONFIGURE_SYSTEM -eq 1 ]; then
echo "configuring system..."
./scripts/configure-system.sh
cd $current_dir
fi
if [ ! -e ${current_dir}/scripts/heartbeat.sh ] ; then
print "heartbeat.sh not found"
exit 1
fi
set -x
mkdir -p /var/log/waggle/
# cleanup original RabbitMQ service definition
systemctl disable rabbitmq-server.service
rm -f /etc/init.d/rabbitmq-server
# copy systemd scripts
rsync -a etc/systemd/ /etc/systemd
systemctl enable \
waggle-heartbeat.service \
waggle-init.service \
rabbitmq-server.service \
waggle-configure-rabbitmq.service \
waggle-plugin-message-router.service \
waggle-monitor-plugins.service \
waggle-cleanup-system.timer
systemctl set-default waggle-core.target
# setup .screen
ln -sf ${current_dir}/etc/dot_screen /home/waggle/.screenrc
ln -sf ${current_dir}/etc/dot_screen /root/.screenrc
set +x
echo "run: udevadm control --reload-rules"
echo " udevadm trigger --subsystem-match=tty --action=add"
echo ""
echo "done"
# may want to move into a different script?
cp ${current_dir}/scripts/rabbitmqadmin /usr/bin
# install the particular version of pywaggle that we tested against
pywaggle_tag="v0.25.0"
pip3 install git+https://github.com/waggle-sensor/pywaggle@${pywaggle_tag}