electrum-personal-server

Maximally lightweight electrum server for a single user
git clone https://git.parazyd.org/electrum-personal-server
Log | Files | Refs | README

commit a11d9b423cce9a17bd5bd31cbc40ca3c90b8e9db
parent 9325842e5c3a6330314877f7b18625587c0b9fa1
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:
Acontrib/electrumpersonalserver.confd | 9+++++++++
Acontrib/electrumpersonalserver.initd | 24++++++++++++++++++++++++
2 files changed, 33 insertions(+), 0 deletions(-)

diff --git a/contrib/electrumpersonalserver.confd b/contrib/electrumpersonalserver.confd @@ -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}" diff --git a/contrib/electrumpersonalserver.initd b/contrib/electrumpersonalserver.initd @@ -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 +}