[midPoint] Run script on connector, I need a little tip.

Wojciech Staszewski wojciech.staszewski at diagnostyka.pl
Tue Jul 11 22:29:01 CEST 2017


Nevermind. I got it (lame, but it works).

<code>println "/opt/midpoint/scripts/test.sh
$username".execute().text</code>

Without "println" and ".text" I got error: "No serializer for class:
class java.lang.UNIXProcess"
THX!
WS


W dniu 11.07.2017 o 21:04, Wojciech Staszewski pisze:
> Hello!
>
> I'm trying to execute "script on connector". I found great documentation
> here:
>
> https://wiki.evolveum.com/display/midPoint/Provisioning+Scripts
> and here:
> https://github.com/Evolveum/midpoint/blob/master/samples/resources/ad/ad-resource-advanced-sync.xml
>
> example:
> <scripts>
>             <script>
>                 <host>connector</host>
>                 <language>Shell</language>
>                 <argument>
>                     <value>jbond</value>
>                     <name>HOMEDIR</name>
>                 </argument>
>                 <code>
>                     echo "after modify," >> C:\a.txt
>                     exit
>         </code>
>         <operation>modify</operation>
>         <order>after</order>
> </script>
>
> Of course it doesn't work. Errors:
>
> "Language not supported: Shell", "Only Groovy is supported", etc.
>
> - OK, but where can I set the path to the script? between <code></code>?
> In the capabilities (configured) section? It doesn't work too...
> - Or maybe you know which connector can execute bash script? I could use
> that connector as a secondary... I can execute shell command from Groovy
> script of course, so this is not necessary.
>
> Thanks!
> Wojciech Staszewski
>
> _______________________________________________
> midPoint mailing list
> midPoint at lists.evolveum.com
> http://lists.evolveum.com/mailman/listinfo/midpoint




More information about the midPoint mailing list