summarylogtreecommitdiffstats
path: root/electrumx.install
diff options
context:
space:
mode:
authorSteven Malis2019-05-13 20:51:27 -0700
committerSteven Malis2019-05-13 20:51:43 -0700
commit90b8449f745ab026f3091637fc5faabc54c8944a (patch)
treed1238a28d802abd978961b4f762bcb548ad64c21 /electrumx.install
parente51888ed1e28d65f5a3e84563aaebd6e687a3d22 (diff)
downloadaur-90b8449f745ab026f3091637fc5faabc54c8944a.tar.gz
Update to version 1.12.0.
Diffstat (limited to 'electrumx.install')
-rw-r--r--electrumx.install114
1 files changed, 0 insertions, 114 deletions
diff --git a/electrumx.install b/electrumx.install
deleted file mode 100644
index 2cbec72882e..00000000000
--- a/electrumx.install
+++ /dev/null
@@ -1,114 +0,0 @@
-_es_user=electrumx
-_es_group=electrumx
-
-post_install() {
- mkdir -p /etc/electrumx
- mkdir -p /srv/electrumx
- _mkuser
- _mkssl
- chown -R $_es_user:$_es_group /etc/electrumx /srv/electrumx
- printf "%b\n" "$ecsda"
-}
-
-post_upgrade() {
- _mkuser
- chown -R $_es_user:$_es_group /etc/electrumx /srv/electrumx
- printf "%b\n" "$ecsda"
-}
-
-post_remove() {
- _rmuser
- rm -rf /etc/electrumx /srv/electrumx
-}
-
-_mkssl() {
- echo -n "Enabling SSL..." # https://en.bitcoin.it/wiki/Enabling_SSL_on_original_client_daemon
- openssl genrsa -out /etc/electrumx/server.pem 2048
- expect <<EOF | perl -ne 'print if /-----BEGIN\sCERTIFICATE-----/../-----END\sCERTIFICATE-----/' > /etc/electrumx/server.cert
- spawn openssl req -new -x509 -nodes -sha1 -days 3650 -key /etc/electrumx/server.pem
- expect "Country*" {
- send "\r"
- }
- expect "State*" {
- send "\r"
- }
- expect "Locality*" {
- send "\r"
- }
- expect "Organization*" {
- send "\r"
- }
- expect "Organizational*" {
- send "\r"
- }
- expect "Common*" {
- send "\r"
- }
- expect "Email*" {
- send "\r"
- }
- expect eof
-EOF
- echo "done"
-}
-
-_mkuser() {
- getent passwd $_es_user &>/dev/null || {
- echo -n "Creating electrumx user... "
- grep -E "^$_es_group:" /etc/group >/dev/null || groupadd $_es_group
- useradd -m -d /etc/electrumx -g $_es_group -s /usr/bin/nologin $_es_user
- echo "done"
- }
-}
-
-_rmuser() {
- echo -n "Removing electrumx user... "
- userdel -rf $_es_user 2>/dev/null
- echo "done"
-}
-
-read -d '' ecdsa <<'EOF'
-########################################################################
-########################################################################
-## ##
-## ElectrumX Server ##
-## ________________ ##
-## ##
-## To start electrumx: ##
-## ##
-## # systemctl start electrumx ##
-## ##
-## To communicate with electrumx as a normal user: ##
-## ##
-## $ electrumx-rpc -p 8000 <command> ##
-## ##
-## To connect to electrumx: ##
-## ##
-## $ electrum --server 127.0.0.1:50002:s --oneserver ##
-## ##
-## Config: /etc/electrumx/electrumx.conf ##
-## Database: /srv/electrumx ##
-## Documentation: /usr/share/doc/electrumx ##
-## ##
-## ##
-## ';,;:. ##
-## 'o' .;d. ##
-## K. :l ##
-## cl .O, ##
-## .c:cclc. ##
-## .;::;. .;ko,. ':::' .',,,. ##
-## .OMMMMMWo ,d,. .oo cXMMMMMX: do. .:d. ##
-## x MMMMMMMMxlX. kdoMMMMMMMMMoxl '0 ##
-## oMMMMMMMN;'K, .Oc;NMMMMMMMX,ld ;k ##
-## :0WMMNk. .cl;,;cl, 'kWMMMWx. :o:,';cc ##
-## .. .'. .oWc. .''. ##
-## 'oc;,;lo. ##
-## ,O. .0. ##
-## :k .0. ##
-## cl,...:o, ##
-## .,,,. ##
-## ##
-## ##
-########################################################################
-########################################################################
-EOF