Forum Discussion
sundogbrew
Altocumulus
Apr 15, 2018Cert replacement script
Hey Guys,
I have a script I have used a bunch of times to replace the cert on a bunch of apps (we use a *) However, I am testing it and it doesn't work anymore? I have been looking at this for hours...
amintej
Cirrus
Apr 17, 2018Hello,
I think you missed one space in the xargs expression between -I_ and n1 "xargs -I_ -n1", in your script is writing "xargs-I_-n1", so "_" is not being replaced by your virtual server name and you send to tmsh "tmsh modify ltm virtual _" and virtual _ does not exit.
tmsh list ltm virtual one-line|grep old-cert|cut -d' ' -f3| xargs -I_ -n1 tmsh modify ltm virtual _ profiles delete { old-cert } profiles add { new-cert }
If this does not solve the problem, I recomend you check procedure step by step:
Check virtual with the profils "old-cert":
tmsh list ltm virtual one-line|grep old-cert
Capture virtual names:
tmsh list ltm virtual one-line|grep old-cert|cut -d' ' -f3
....
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects