From 09fc2dffea6ad522e0670f41557c2898fc03a0c8 Mon Sep 17 00:00:00 2001
From: =?utf8?q?Am=C3=A9lia=20Coutard-Sander?= <git@ameliathe1st.gay>
Date: Mon, 25 Nov 2024 23:11:47 +0100
Subject: [PATCH] Command to run the needed daemon, and put the necessary
 information in a specified GNS zone

---
 run-daemons.sh | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100755 run-daemons.sh

diff --git a/run-daemons.sh b/run-daemons.sh
new file mode 100755
index 0000000..6187bc4
--- /dev/null
+++ b/run-daemons.sh
@@ -0,0 +1,17 @@
+#!/usr/bin/env bash
+
+if test -z $1 || test -z $2 || ! test -z $3; then
+	echo >&2 "Usage: $0 <ego> <repo-name>"
+	exit 1
+fi
+
+ego="$1"
+name="$2"
+
+echo >&2 "Running pullable repo $name in ego $ego."
+gnunet-namestore -a -t TXT -e 1d -n "$name" -V "$(gnunet-core -i | sed 's/.*: //'):$name" -z "$ego"
+
+./daemon.sh upload-pack "$name"
+
+gnunet-namestore -d -n "$name" -z "$ego"
+echo >&2 "Terminating pullable repo $name in ego $ego."
-- 
2.46.0