This commit is contained in:
Sebastian
2024-09-11 15:00:23 +02:00
parent a12c17bada
commit 59b132ee62
2 changed files with 16 additions and 0 deletions

8
rm.sh Executable file
View File

@@ -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' ' ')

8
stop.sh Executable file
View File

@@ -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' ' ')