I create a script called abc, saved the config, then did the following, it seems to work. The error msg seems to indicate that you need to wrap the proc in
script {
proc script::init {
the script ...
}
}
[root@10-2:Active] config b load
Reading configuration from /config/low_profile_base.conf.
Reading configuration from /defaults/config_base.conf.
Reading configuration from /config/bigip_sys.conf.
Reading configuration from /config/bigip_base.conf.
Reading configuration from /usr/share/monitors/base_monitors.conf.
Reading configuration from /config/profile_base.conf.
Reading configuration from /config/daemon.conf.
Reading configuration from /config/bigip.conf.
Reading configuration from /config/bigip_local.conf.
Loading the configuration ...
[root@10-2:Active] config cat bigip.conf
shell write partition Common
script abc {
proc script::init {} {
}
proc script::run {} {
puts hello
}
proc script::help {} {
}
proc script::tabc {} {
}
}
node 10.1.1.1 {}
pool test {
monitor all http
members 10.1.1.1:http {}
}
[root@10-2:Active] config tmsh run cli script abc
hello
[root@10-2:Active] config