From e10098fa900cac61222d15340ccbcaff78e4207d Mon Sep 17 00:00:00 2001 From: aggstam Date: Tue, 2 Aug 2022 17:00:58 +0300 Subject: [PATCH] script/research/seedd: updated config with default ports and added lilith init files --- script/research/seedd/init/lilith.confd | 1 + script/research/seedd/init/lilith.initd | 35 +++++++++++++++++++++++++ script/research/seedd/seedd_config.toml | 14 +++++++--- 3 files changed, 46 insertions(+), 4 deletions(-) create mode 100644 script/research/seedd/init/lilith.confd create mode 100644 script/research/seedd/init/lilith.initd diff --git a/script/research/seedd/init/lilith.confd b/script/research/seedd/init/lilith.confd new file mode 100644 index 000000000..c1660eb9e --- /dev/null +++ b/script/research/seedd/init/lilith.confd @@ -0,0 +1 @@ +USER="lilith" diff --git a/script/research/seedd/init/lilith.initd b/script/research/seedd/init/lilith.initd new file mode 100644 index 000000000..02cafe4cc --- /dev/null +++ b/script/research/seedd/init/lilith.initd @@ -0,0 +1,35 @@ +#!/sbin/openrc-run +# Copyright 1999-2022 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +depend() { + use net +} + +start() { + PWHOME="$(getent passwd $USER | awk -F: '{ print $6 }')" + + ebegin "Starting lilith" + env TERM="xterm" \ + start-stop-daemon \ + --start \ + --make-pidfile \ + --pidfile /var/run/lilith.pid \ + --background \ + --user $USER \ + --env HOME="${PWHOME:-/home/$USER}" \ + --name lilith \ + --exec /usr/bin/screen -- -D -m -S lilith /usr/local/bin/lilith + eend $? +} + +stop() { + ebegin "Stopping lilith" + # Because we've daemonized with screen, we need to replace the PID file + # with the real PID of the program + pgrep -P $(cat /var/run/lilith.pid) > /var/run/lilith.pid + + start-stop-daemon --stop --signal 15 \ + --pidfile /var/run/lilith.pid + eend $? +} diff --git a/script/research/seedd/seedd_config.toml b/script/research/seedd/seedd_config.toml index 0162f0b32..5ffc37cdc 100644 --- a/script/research/seedd/seedd_config.toml +++ b/script/research/seedd/seedd_config.toml @@ -10,17 +10,23 @@ #url = "tcp://127.0.0.1" ## Per-network settings -#[network."darkfid"] -#port = 7650 +#[network."darkfid_sync"] +#port = 33032 +#seeds = [] +#peers = [] + +## Per-network settings +#[network."darkfid_consensus"] +#port = 33033 #seeds = [] #peers = [] #[network."ircd"] -#port = 8760 +#port = 25551 #seeds = [] #peers = [] #[network."taud"] -#port = 9870 +#port = 23331 #seeds = [] #peers = []