Forum Discussion
Upload iFiles to Bigip from Samba share
- Apr 04, 2023
I wouldn't recommend having the BIG-IP be the controlling agent here, but if you want to do that, the smbclient executable is on the host and can be used with a bash script like:
#!/bin/bash SMBSRV="smbserver" SMBSHARE="share_name" SMBUSER="username" SMBPASS="password" FNAME="CRLupdates" smbclient //$SMBSRV/$SMBSHARE -U $SMBUSER%$SMBPASS -c "get $FNAME" if [ $? -eq 0 ]; then echo "$FNAME retrieved" else echo "$FNAME not retrieved" fi
You could then have an iCall script with a periodic handler at whatever interval you wish execute the bash script, then create an iFile from its contents.
Personally, I'd move all the control off the BIG-IP and have an externally managed process (could also be a simple script, but documented in an operational procedure) check the share for updates to that file and upload them to BIG-IP and then modify the iFile as needed.
I wouldn't recommend having the BIG-IP be the controlling agent here, but if you want to do that, the smbclient executable is on the host and can be used with a bash script like:
#!/bin/bash
SMBSRV="smbserver"
SMBSHARE="share_name"
SMBUSER="username"
SMBPASS="password"
FNAME="CRLupdates"
smbclient //$SMBSRV/$SMBSHARE -U $SMBUSER%$SMBPASS -c "get $FNAME"
if [ $? -eq 0 ]; then
echo "$FNAME retrieved"
else
echo "$FNAME not retrieved"
fi
You could then have an iCall script with a periodic handler at whatever interval you wish execute the bash script, then create an iFile from its contents.
Personally, I'd move all the control off the BIG-IP and have an externally managed process (could also be a simple script, but documented in an operational procedure) check the share for updates to that file and upload them to BIG-IP and then modify the iFile as needed.
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com