# After.sh.erb: wait until script.sh.erb finishes

**URL:** <https://discourse.openondemand.org/t/after-sh-erb-wait-until-script-sh-erb-finishes/4389>\
**Category:** Get Help\
**Created:** [July 25, 2025, 5:06pm UTC](https://discourse.openondemand.org/t/after-sh-erb-wait-until-script-sh-erb-finishes/4389 "2025-07-25T17:06:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kstine](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/kstine/32/2539_2.png) [@kstine](https://discourse.openondemand.org/u/kstine)\
**Post date:** [July 25, 2025, 5:06pm UTC](https://discourse.openondemand.org/t/after-sh-erb-wait-until-script-sh-erb-finishes/4389/1 "2025-07-25T17:06:12Z")

</div>

What’s the best way to stop the connection card from switching to “running” until the `script.sh.erb` file reaches the `/proc/$pid` check? A port isn’t being opened by the application as it works in conjunction with another OOD app, so I can’t check for a specific port.

One of the last things done in the `script.sh.erb` is create a directory. Is there a way for the after.sh.erb to check if a directory exists?

---

<div class="post-metadata">

**Author:** ![jeff.ohrstrom](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/jeff.ohrstrom/32/136_2.png) [@jeff.ohrstrom](https://discourse.openondemand.org/u/jeff.ohrstrom)\
**Post date:** [July 25, 2025, 5:15pm UTC](https://discourse.openondemand.org/t/after-sh-erb-wait-until-script-sh-erb-finishes/4389/2 "2025-07-25T17:15:23Z")

</div>

Sure yea you can do anything in the `after.sh.erb`, it’s a shell script after all. Just have it block until you’re ready to move on.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/osc/original/2X/b/bae70bd0ed39a3ae769c2108155f4cb3e9da8385.png) [@system](https://discourse.openondemand.org/u/system)\
**Post date:** [January 21, 2026, 5:15pm UTC](https://discourse.openondemand.org/t/after-sh-erb-wait-until-script-sh-erb-finishes/4389/3 "2026-01-21T17:15:24Z")

</div>

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
