diff options
| author | polwex <polwex@sortug.com> | 2025-10-06 01:01:41 +0700 |
|---|---|---|
| committer | polwex <polwex@sortug.com> | 2025-10-06 01:01:41 +0700 |
| commit | c4b392a179048f936c062f5ffccc2bc25627e500 (patch) | |
| tree | 09be0904be8ec4d7ea52992ef7580d42ed0c28c1 /vere/docker/reset_urbit_code.sh | |
working
Diffstat (limited to 'vere/docker/reset_urbit_code.sh')
| -rwxr-xr-x | vere/docker/reset_urbit_code.sh | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/vere/docker/reset_urbit_code.sh b/vere/docker/reset_urbit_code.sh new file mode 100755 index 0000000..20af60d --- /dev/null +++ b/vere/docker/reset_urbit_code.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +# Sending `+hood/code %reset` to `dojo` resets the `+code`, but it requires +# interactive confirmation to do so. Obviously, we don't want to have to provide +# that confirmation, so we force reset the `+code` using +# `+hood/pass [%j %step ~]`, credit for which goes to ~wicdev-wisryt. +resp=$(curl -s -X POST -H "Content-Type: application/json" \ + -d '{ "source": { "dojo": "+hood/pass [%j %step ~]" }, "sink": { "app": "hood" } }' \ + http://127.0.0.1:12321) + +if [[ $? -eq 0 ]] +then + echo "OK" +else + echo "Curl error: $?" +fi |
