6 # -o pipefail: Fail on errors in scripts this calls, give stacktrace
10 sudo systemctl stop opendaylight
12 # Check systemd status of OpenDaylight
13 # NB: Exit code 3 means service isn't running, including after clean exit
15 sudo systemctl status opendaylight
17 echo "OpenDaylight systemd service unexpectedly not stopped"
20 echo "OpenDaylight systemd service stopped, as expected"
24 # Verify Java process is not running
25 if ps aux | grep "[o]pendaylight"; then
26 # Fail if exit code 0, ie Java process is running
27 echo "OpenDaylight process unexpectedly still running"
30 echo "OpenDaylight process not running, as expected"