cancel
Showing results for 
Search instead for 
Did you mean: 
Login & Join the DevCentral Connects Group to watch the Recorded LiveStream (May 12) on Basic iControl Security - show notes included.
akhmarov
Altostratus
Altostratus

Problem this snippet solves:

After TMOS version upgrade or iApp template file upgrade usually all iApps created from templates shows warning flag "Source Template Has Changed". You can reset this flag from GUI opening each changed iApp and manually saving configuration. Another way is to use TMSH command "modify /sys application service $APP_NAME execute-action definition". But what if you have several partitions with multiply iApps configured. This process could steal too much time.

This TMSH alias allows you to easily update all configured iApps in all partitions which configuration has changed after template or TMOS upgrade.

How to use this snippet:

Just call TMSH alias "app_update" and watch which iApps will be fixed

Code :

create cli alias shared app_update { command "run /util bash -c \"app_list=$(tmsh -q -c 'list sys application service recursive /* { template-modified }' | grep -B 1 'template-modified yes' | grep 'sys application service' | awk '{print $4}'); for app in $app_list; do echo -n 'Updating application '; echo $app; tmsh modify /sys application service $app execute-action definition; done\"" }

Tested this on version:

13.0
Version history
Last update:
‎12-Apr-2018 08:18
Updated by:
Contributors