diff --git a/rm.sh b/rm.sh new file mode 100755 index 00000000..45f7406c --- /dev/null +++ b/rm.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +if [ -z "$1" ] || [ ! -f "/root/rpc/$1.yml" ]; then + echo "Error: Either no argument provided or /root/rpc/$1.yml does not exist." + exit 1 +fi + +docker compose rm $(cat /root/rpc/$1.yml | yaml2json - | jq '.services' | jq -r 'keys[]' | tr '\n' ' ') diff --git a/stop.sh b/stop.sh new file mode 100755 index 00000000..14aa38d2 --- /dev/null +++ b/stop.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +if [ -z "$1" ] || [ ! -f "/root/rpc/$1.yml" ]; then + echo "Error: Either no argument provided or /root/rpc/$1.yml does not exist." + exit 1 +fi + +docker compose stop $(cat /root/rpc/$1.yml | yaml2json - | jq '.services' | jq -r 'keys[]' | tr '\n' ' ')