Remove unused views
[releng/builder.git] / jjb / packaging / start-odl.sh
1 #!/bin/bash
2
3 # Options:
4 #   -x: Echo commands
5 #   -e: Fail on errors
6 #   -o pipefail: Fail on errors in scripts this calls, give stacktrace
7 set -ex -o pipefail
8
9 # Start OpenDaylight
10 sudo systemctl start opendaylight
11
12 # Check systemd status of OpenDaylight, will fail if rc is nonzero
13 sudo systemctl status opendaylight
14
15 # Wait up to 60 seconds for ODL's Java process to start
16 for i in $(seq 20); do
17   pgrep java && break || sleep 3
18   echo "Waited $((i * 3)) seconds for ODL Java process to start"
19 done
20
21 # Verify Java process is running, will fail if rc is nonzero
22 pgrep java