6 # -o pipefail: Fail on errors in scripts this calls, give stacktrace
9 # Install ODL from .rpm link or .repo url
10 if [[ $URL == *.rpm ]]
12 sudo yum install -y "$URL"
13 elif [[ $URL == *.repo ]]
15 # shellcheck disable=SC2154
16 repo_file="${{URL##*/}}"
17 sudo curl --silent -o /etc/yum.repos.d/"$repo_file" "$URL"
18 sudo yum install -y opendaylight
20 echo "URL is not a link to .rpm or .repo"
25 sudo systemctl start opendaylight
27 # Check status of OpenDaylight
28 sudo systemctl status opendaylight
30 # Get process id of Java
33 # Install expect to interact with karaf shell
34 sudo yum install -y expect