diff options
Diffstat (limited to 'examples/docker/SRv6_5-node/restart_demo.sh')
-rwxr-xr-x | examples/docker/SRv6_5-node/restart_demo.sh | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/examples/docker/SRv6_5-node/restart_demo.sh b/examples/docker/SRv6_5-node/restart_demo.sh new file mode 100755 index 000000000..81fdd76e8 --- /dev/null +++ b/examples/docker/SRv6_5-node/restart_demo.sh @@ -0,0 +1,27 @@ +#! /bin/bash + +if [[ $UID != 0 ]]; then + echo "Please run this script with sudo:" + echo "sudo $0 $*" + exit 1 +fi + +if [ -z "$1" ]; then + echo "Demo type argument missing!" + echo "Usage:" + echo -e "\n'$0 <demo_type>' to run this command!\n" + echo "<demo_type> - vpp or hc" + exit 2 +fi + +demo_type=$1 + +if [[ "$demo_type" != "vpp" && "$demo_type" != "hc" ]]; then + echo "Demo type argument is wrong!" + echo "<demo_type> - vpp or hc" + exit 3 +fi + +./clean_demo.sh +sleep 5 +./start_demo.sh ${demo_type} |