-# Saves the VES agent configuration to the startup script.
-#
-# Get the current VES agent configuration from the bash command:
-# \$vppctl show ves agent
-# Server Addr Server Port Interval Enabled
-# 127.0.0.1 8080 10 True
-# Set the VES agent configuration with the bash command:
-# \$vppctl set ves agent server 127.0.0.1 port 8080 intval 10
-#
-save_ves_config()
-{
- local server=""
- local port=""
- local intval=""
-
- local ves_config=\`vppctl show ves agent | head -2 | tail -1\`
- if [ "\${ves_config}" != "" ] ;then
- server=\`echo \${ves_config} | awk '{ print \$1 }'\`
- port=\`echo \${ves_config} | awk '{ print \$2 }'\`
- intval=\`echo \${ves_config} | awk '{ print \$3 }'\`
- write_startup_scripts add "set ves agent server \${server} port \${port} intval \${intval}"
- fi
-}
-