Hi
I am trying to create a script in order to backup a F5 BigIP.
The scripts runs without issues on the device when i run it on the console(ssh) , but when i use Kiwi Cattools, the script fails.
The reason i''m using variables, is to be able to backup multiple F5 devices into one dir, retaining the ID of the device.
I must be doing something dumb, or i don't get it.
#!/bin/bash
terminal width 120
FTPHOST=[IP]
HOST=$HOSTNAME
USER=F5
PASS=XXXXX
UPATH1=Config'/'Current'/'
UPATH=`date +%Y'/'%m'/'%d`
FPATH="$UPATH1$UPATH"
cd /config
tmsh -c "save sys config base"
cp bigip_base.conf $HOST.conf
ftp -inv << EOF
open $FTPHOST
user $USER $PASS
bin
mkdir $FPATH
put /config/$HOST.conf /$FPATH/$HOST.txt
close
bye
EOF
KiwiCattools fails on reading the variables, i get "waiting for respons to command", waiting for an echo.
I am using Device.CLI.Send Commands.
Question ofcourse is... :how to fix it, how to set specifics for each device using variables ? Am i missing the point completly? Is it even possible what i''d like to achieve.
What am i doing wrong?
If anybody can point me to some docs on how to use bash within scripts for KiwiCatTools, that would be great too.
Thank you in advance.
With kind regards, Thijn