tMerge pull request #235 from parazyd/openrc-initscript - electrum-personal-server - Maximally lightweight electrum server for a single user
HTML git clone https://git.parazyd.org/electrum-personal-server
DIR Log
DIR Files
DIR Refs
DIR README
---
DIR commit a11d9b423cce9a17bd5bd31cbc40ca3c90b8e9db
DIR parent 9325842e5c3a6330314877f7b18625587c0b9fa1
HTML Author: chris-belcher <belcher@riseup.net>
Date: Tue, 23 Feb 2021 15:15:11 +0000
Merge pull request #235 from parazyd/openrc-initscript
Add OpenRC initscripts in contrib.
Diffstat:
A contrib/electrumpersonalserver.con… | 9 +++++++++
A contrib/electrumpersonalserver.ini… | 24 ++++++++++++++++++++++++
2 files changed, 33 insertions(+), 0 deletions(-)
---
DIR diff --git a/contrib/electrumpersonalserver.confd b/contrib/electrumpersonalserver.confd
t@@ -0,0 +1,9 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+eps_user="bitcoin"
+eps_group="bitcoin"
+
+eps_config="/etc/electrum-personal-server.ini"
+
+eps_args="${eps_config}"
DIR diff --git a/contrib/electrumpersonalserver.initd b/contrib/electrumpersonalserver.initd
t@@ -0,0 +1,24 @@
+#!/sbin/openrc-run
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+pidfile="/var/run/electrum-personal-server.pid"
+command="/usr/bin/electrum-personal-server"
+command_args="${eps_args}"
+start_stop_daemon_args="-u ${eps_user} -b -m -p ${pidfile}"
+
+name="Electrum Personal Server"
+description="Connects to the bitcoind RPC"
+
+depend() {
+ need bitcoind
+}
+
+start_pre() {
+ if ! [ -e "${eps_config}" ]; then
+ eerror ""
+ eerror "Please create a configuration in ${eps_config}"
+ eerror ""
+ return 1
+ fi
+}