2 # SPDX-license-identifier: Apache-2.0
3 ##############################################################################
5 # All rights reserved. This program and the accompanying materials
6 # are made available under the terms of the Apache License, Version 2.0
7 # which accompanies this distribution, and is available at
8 # http://www.apache.org/licenses/LICENSE-2.0
9 ##############################################################################
16 # install_dependencies() - Install required dependencies
17 function install_dependencies {
19 apt install -y wget darkstat net-tools
21 # Configure and run Darkstat
22 sed -i "s/START_DARKSTAT=.*/START_DARKSTAT=yes/g;s/INTERFACE=.*/INTERFACE=\"-i eth1\"/g" /etc/darkstat/init.cfg
24 systemctl restart darkstat
27 # install_vfw_scripts() -
28 function install_vfw_scripts {
30 wget -q https://git.onap.org/demo/plain/vnfs/vFW/scripts/{v_sink_init,vsink}.sh
33 mv vsink.sh /etc/init.d
34 update-rc.d vsink.sh defaults
40 echo "$protected_net_cidr" > /opt/config/protected_net_cidr.txt
41 echo "$vfw_private_ip_0" > /opt/config/fw_ipaddr.txt
42 echo "$vsn_private_ip_0" > /opt/config/sink_ipaddr.txt
43 echo "$demo_artifacts_version" > /opt/config/demo_artifacts_version.txt
44 echo "$protected_net_gw" > /opt/config/protected_net_gw.txt
45 echo "$protected_private_net_cidr" > /opt/config/unprotected_net.txt