blob: 20af60d7fc9089c624547b65c049273624f7a53a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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
|