# informEvent to an external script

**URL:** <https://forum.genieacs.com/t/informevent-to-an-external-script/44>\
**Category:** Uncategorized\
**Created:** [February 8, 2019, 8:57pm UTC](https://forum.genieacs.com/t/informevent-to-an-external-script/44 "2019-02-08T20:57:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![cubicalmonkey](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.genieacs.com/cubicalmonkey/32/1169_2.png) [@cubicalmonkey](https://forum.genieacs.com/u/cubicalmonkey)\
**Post date:** [February 8, 2019, 8:57pm UTC](https://forum.genieacs.com/t/informevent-to-an-external-script/44/1 "2019-02-08T20:57:28Z")

</div>

Is it possible to pass an informEvent to an external script ?  
IE: Preset is calls an external script for all Devices matching “Product Class” $x.  
External script does $foo depending which informEvent it’s received.

I’m assuming this is doable I just can’t seem to find anything documenting the arguments or examples.

---

<div class="post-metadata">

**Author:** ![akcoder](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.genieacs.com/akcoder/32/11_2.png) [@akcoder](https://forum.genieacs.com/u/akcoder)\
**Post date:** [February 9, 2019, 12:12am UTC](https://forum.genieacs.com/t/informevent-to-an-external-script/44/2 "2019-02-09T00:12:51Z")

</div>

You would use a preset to kick off a provision script. Review the documentation at [https://github.com/genieacs/genieacs-gui/wiki/Presets-Tab](https://github.com/genieacs/genieacs-gui/wiki/Presets-Tab), [https://github.com/genieacs/genieacs/wiki/Example-of-a-Provisioning-Flow](https://github.com/genieacs/genieacs/wiki/Example-of-a-Provisioning-Flow) and [https://github.com/genieacs/genieacs/wiki/Extensions](https://github.com/genieacs/genieacs/wiki/Extensions)

---

<div class="post-metadata">

**Author:** ![cubicalmonkey](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.genieacs.com/cubicalmonkey/32/1169_2.png) [@cubicalmonkey](https://forum.genieacs.com/u/cubicalmonkey)\
**Post date:** [February 10, 2019, 2:16pm UTC](https://forum.genieacs.com/t/informevent-to-an-external-script/44/3 "2019-02-10T14:16:43Z")

</div>

Thanks for the info. In developing my external provisioning script, I read through those pages and they were all very helpful. I don’t know if I’m over looking something obvious in the docs so apologizes if I am.

If I understand the presets correctly, I need to create multiple presets to perform the same task depending which event occurs.  
IE:  
Preset #1 Event: 1BOOT – Execute Provision: “CONFIG\_RATELIMITS”  
Preset #2 Event: M Reboot – Execute Provision: “CONFIG\_RATELIMITS”  
Preset #3 Event: 1 BOOT, -0 BOOTSTRAP – Execute Provision: “CONFIG\_RATELIMITS”

My thought was to send the event as an argument "CONFIG\_RATELIMITS ( EVENT ) " to the external script and let it do what I need depending on the event. That way I don’t have multiple presets all running the same external script.  
I see the Arguments field next to the Provision Name field on the Presets tab, so I’m wondering if there’s a variable I need to add there in order to pass along the actual event that triggered the preset.

Thanks again!

---

<div class="post-metadata">

**Author:** ![akcoder](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.genieacs.com/akcoder/32/11_2.png) [@akcoder](https://forum.genieacs.com/u/akcoder)\
**Post date:** [February 11, 2019, 9:35pm UTC](https://forum.genieacs.com/t/informevent-to-an-external-script/44/4 "2019-02-11T21:35:37Z")

</div>

This preset will execute on every boot - #1 Event: 1BOOT – Execute Provision: “CONFIG\_RATELIMITS”

This preset will execute every reboot - Preset #2 Event: M Reboot – Execute Provision: “CONFIG\_RATELIMITS”  
This preset will only execute on a boot event that is not also a bootstrap - Preset #3 Event: 1 BOOT, -0 BOOTSTRAP – Execute Provision: “CONFIG\_RATELIMITS”

The args for presets are in the wiki, I believe in the gui wiki though.

-dan
