Add litecoin backend package
This commit is contained in:
parent
5baf69adab
commit
b6d66cf6a8
13
contrib/backends/litecoin/Makefile
Normal file
13
contrib/backends/litecoin/Makefile
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
LITECOIN_VERSION := 0.16.0
|
||||||
|
|
||||||
|
all:
|
||||||
|
wget https://download.litecoin.org/litecoin-${LITECOIN_VERSION}/linux/litecoin-${LITECOIN_VERSION}-x86_64-linux-gnu.tar.gz
|
||||||
|
tar -xf litecoin-${LITECOIN_VERSION}-x86_64-linux-gnu.tar.gz
|
||||||
|
mv litecoin-${LITECOIN_VERSION} litecoin
|
||||||
|
rm litecoin/bin/litecoin-qt
|
||||||
|
rm litecoin/bin/test_litecoin
|
||||||
|
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -rf litecoin
|
||||||
|
rm -f litecoin-${LITECOIN_VERSION}-x86_64-linux-gnu.tar.gz
|
||||||
@ -0,0 +1 @@
|
|||||||
|
/opt/coins/nodes/litecoin_testnet/litecoin_testnet.conf
|
||||||
@ -0,0 +1 @@
|
|||||||
|
/opt/coins/data/litecoin_testnet/backend
|
||||||
@ -0,0 +1,2 @@
|
|||||||
|
litecoin/* /opt/coins/nodes/litecoin_testnet
|
||||||
|
litecoin_testnet.conf /opt/coins/nodes/litecoin_testnet
|
||||||
@ -0,0 +1,10 @@
|
|||||||
|
/opt/coins/data/litecoin_testnet/backend/testnet3/debug.log
|
||||||
|
/opt/coins/data/litecoin_testnet/backend/testnet3/db.log
|
||||||
|
{
|
||||||
|
rotate 7
|
||||||
|
daily
|
||||||
|
compress
|
||||||
|
missingok
|
||||||
|
notifempty
|
||||||
|
copytruncate
|
||||||
|
}
|
||||||
@ -0,0 +1,20 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
|
||||||
|
configure)
|
||||||
|
if ! id -u litecoin &> /dev/null
|
||||||
|
then
|
||||||
|
useradd --system -M -U litecoin -s /bin/false
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$(stat -c '%U' /opt/coins/data/litecoin_testnet/backend)" != "litecoin" ]
|
||||||
|
then
|
||||||
|
chown -R litecoin:litecoin /opt/coins/data/litecoin_testnet/backend
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
|
esac
|
||||||
|
|
||||||
|
#DEBHELPER#
|
||||||
@ -0,0 +1,47 @@
|
|||||||
|
# It is not recommended to modify this file in-place, because it will
|
||||||
|
# be overwritten during package upgrades. If you want to add further
|
||||||
|
# options or overwrite existing ones then use
|
||||||
|
# $ systemctl edit litecoin-testnet.service
|
||||||
|
# See "man systemd.service" for details.
|
||||||
|
|
||||||
|
# Note that almost all daemon options could be specified in
|
||||||
|
# /opt/coins/nodes/litecoin_testnet/litecoin_testnet.conf
|
||||||
|
|
||||||
|
[Unit]
|
||||||
|
Description=litecoin daemon (testnet)
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=/opt/coins/nodes/litecoin_testnet/bin/litecoind -datadir=/opt/coins/data/litecoin_testnet/backend -conf=/opt/coins/nodes/litecoin_testnet/litecoin_testnet.conf -pid=/run/litecoind/litecoin_testnet.pid
|
||||||
|
# Creates /run/litecoind owned by litecoin
|
||||||
|
RuntimeDirectory=litecoind
|
||||||
|
User=litecoin
|
||||||
|
Type=forking
|
||||||
|
PIDFile=/run/litecoind/litecoin_testnet.pid
|
||||||
|
Restart=on-failure
|
||||||
|
|
||||||
|
# Resource limits
|
||||||
|
LimitNOFILE=500000
|
||||||
|
|
||||||
|
# Hardening measures
|
||||||
|
####################
|
||||||
|
|
||||||
|
# Provide a private /tmp and /var/tmp.
|
||||||
|
PrivateTmp=true
|
||||||
|
|
||||||
|
# Mount /usr, /boot/ and /etc read-only for the process.
|
||||||
|
ProtectSystem=full
|
||||||
|
|
||||||
|
# Disallow the process and all of its children to gain
|
||||||
|
# new privileges through execve().
|
||||||
|
NoNewPrivileges=true
|
||||||
|
|
||||||
|
# Use a new /dev namespace only populated with API pseudo devices
|
||||||
|
# such as /dev/null, /dev/zero and /dev/random.
|
||||||
|
PrivateDevices=true
|
||||||
|
|
||||||
|
# Deny the creation of writable and executable memory mappings.
|
||||||
|
MemoryDenyWriteExecute=true
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
@ -0,0 +1 @@
|
|||||||
|
/opt/coins/nodes/litecoin/litecoin.conf
|
||||||
1
contrib/backends/litecoin/debian/backend-litecoin.dirs
Normal file
1
contrib/backends/litecoin/debian/backend-litecoin.dirs
Normal file
@ -0,0 +1 @@
|
|||||||
|
/opt/coins/data/litecoin/backend
|
||||||
@ -0,0 +1,2 @@
|
|||||||
|
litecoin/* /opt/coins/nodes/litecoin
|
||||||
|
litecoin.conf /opt/coins/nodes/litecoin
|
||||||
10
contrib/backends/litecoin/debian/backend-litecoin.logrotate
Normal file
10
contrib/backends/litecoin/debian/backend-litecoin.logrotate
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
/opt/coins/data/litecoin/backend/debug.log
|
||||||
|
/opt/coins/data/litecoin/backend/db.log
|
||||||
|
{
|
||||||
|
rotate 7
|
||||||
|
daily
|
||||||
|
compress
|
||||||
|
missingok
|
||||||
|
notifempty
|
||||||
|
copytruncate
|
||||||
|
}
|
||||||
20
contrib/backends/litecoin/debian/backend-litecoin.postinst
Normal file
20
contrib/backends/litecoin/debian/backend-litecoin.postinst
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
|
||||||
|
configure)
|
||||||
|
if ! id -u litecoin &> /dev/null
|
||||||
|
then
|
||||||
|
useradd --system -M -U litecoin -s /bin/false
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$(stat -c '%U' /opt/coins/data/litecoin/backend)" != "litecoin" ]
|
||||||
|
then
|
||||||
|
chown -R litecoin:litecoin /opt/coins/data/litecoin/backend
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
|
esac
|
||||||
|
|
||||||
|
#DEBHELPER#
|
||||||
47
contrib/backends/litecoin/debian/backend-litecoin.service
Normal file
47
contrib/backends/litecoin/debian/backend-litecoin.service
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
# It is not recommended to modify this file in-place, because it will
|
||||||
|
# be overwritten during package upgrades. If you want to add further
|
||||||
|
# options or overwrite existing ones then use
|
||||||
|
# $ systemctl edit litecoin.service
|
||||||
|
# See "man systemd.service" for details.
|
||||||
|
|
||||||
|
# Note that almost all daemon options could be specified in
|
||||||
|
# /opt/coins/nodes/litecoin/litecoin.conf
|
||||||
|
|
||||||
|
[Unit]
|
||||||
|
Description=litecoin daemon (mainnet)
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=/opt/coins/nodes/litecoin/bin/litecoind -datadir=/opt/coins/data/litecoin/backend -conf=/opt/coins/nodes/litecoin/litecoin.conf -pid=/run/litecoind/litecoin.pid
|
||||||
|
# Creates /run/litecoind owned by litecoin
|
||||||
|
RuntimeDirectory=litecoind
|
||||||
|
User=litecoin
|
||||||
|
Type=forking
|
||||||
|
PIDFile=/run/litecoind/litecoin.pid
|
||||||
|
Restart=on-failure
|
||||||
|
|
||||||
|
# Resource limits
|
||||||
|
LimitNOFILE=500000
|
||||||
|
|
||||||
|
# Hardening measures
|
||||||
|
####################
|
||||||
|
|
||||||
|
# Provide a private /tmp and /var/tmp.
|
||||||
|
PrivateTmp=true
|
||||||
|
|
||||||
|
# Mount /usr, /boot/ and /etc read-only for the process.
|
||||||
|
ProtectSystem=full
|
||||||
|
|
||||||
|
# Disallow the process and all of its children to gain
|
||||||
|
# new privileges through execve().
|
||||||
|
NoNewPrivileges=true
|
||||||
|
|
||||||
|
# Use a new /dev namespace only populated with API pseudo devices
|
||||||
|
# such as /dev/null, /dev/zero and /dev/random.
|
||||||
|
PrivateDevices=true
|
||||||
|
|
||||||
|
# Deny the creation of writable and executable memory mappings.
|
||||||
|
MemoryDenyWriteExecute=true
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
5
contrib/backends/litecoin/debian/changelog
Normal file
5
contrib/backends/litecoin/debian/changelog
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
litecoin (0.16.0-satoshilabs1) unstable; urgency=medium
|
||||||
|
|
||||||
|
* Initial build
|
||||||
|
|
||||||
|
-- Martin Bohm <martin.bohm@satoshilabs.com> Mon, 11 Jun 2018 11:12:13 +0200
|
||||||
1
contrib/backends/litecoin/debian/compat
Normal file
1
contrib/backends/litecoin/debian/compat
Normal file
@ -0,0 +1 @@
|
|||||||
|
9
|
||||||
16
contrib/backends/litecoin/debian/control
Normal file
16
contrib/backends/litecoin/debian/control
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
Source: litecoin
|
||||||
|
Section: satoshilabs
|
||||||
|
Priority: optional
|
||||||
|
Maintainer: martin.bohm@satoshilabs.com
|
||||||
|
Build-Depends: debhelper, wget, tar, gzip, make, dh-systemd, dh-exec
|
||||||
|
Standards-Version: 3.9.5
|
||||||
|
|
||||||
|
Package: backend-litecoin
|
||||||
|
Architecture: amd64
|
||||||
|
Depends: ${shlibs:Depends}, ${misc:Depends}, logrotate
|
||||||
|
Description: Satoshilabs packaged litecoin server
|
||||||
|
|
||||||
|
Package: backend-litecoin-testnet
|
||||||
|
Architecture: amd64
|
||||||
|
Depends: ${shlibs:Depends}, ${misc:Depends}, logrotate
|
||||||
|
Description: Satoshilabs packaged litecoin server
|
||||||
11
contrib/backends/litecoin/debian/rules
Executable file
11
contrib/backends/litecoin/debian/rules
Executable file
@ -0,0 +1,11 @@
|
|||||||
|
#!/usr/bin/make -f
|
||||||
|
|
||||||
|
DH_VERBOSE = 1
|
||||||
|
|
||||||
|
%:
|
||||||
|
dh $@ --with=systemd
|
||||||
|
|
||||||
|
override_dh_systemd_start:
|
||||||
|
dh_systemd_start --no-start
|
||||||
|
|
||||||
|
override_dh_installinit:
|
||||||
18
contrib/backends/litecoin/litecoin.conf
Normal file
18
contrib/backends/litecoin/litecoin.conf
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
daemon=1
|
||||||
|
server=1
|
||||||
|
nolisten=1
|
||||||
|
rpcuser=rpc
|
||||||
|
rpcpassword=rpc
|
||||||
|
rpcport=8034
|
||||||
|
txindex=1
|
||||||
|
whitelist=127.0.0.1
|
||||||
|
rpcallowip=127.0.0.1
|
||||||
|
|
||||||
|
zmqpubhashtx=tcp://127.0.0.1:38334
|
||||||
|
zmqpubhashblock=tcp://127.0.0.1:38334
|
||||||
|
|
||||||
|
rpcworkqueue=1100
|
||||||
|
maxmempool=2000
|
||||||
|
dbcache=1000
|
||||||
|
|
||||||
|
|
||||||
15
contrib/backends/litecoin/litecoin_testnet.conf
Normal file
15
contrib/backends/litecoin/litecoin_testnet.conf
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
daemon=1
|
||||||
|
server=1
|
||||||
|
testnet=1
|
||||||
|
nolisten=1
|
||||||
|
rpcuser=rpc
|
||||||
|
rpcpassword=rpc
|
||||||
|
rpcport=18033
|
||||||
|
txindex=1
|
||||||
|
|
||||||
|
zmqpubhashtx=tcp://127.0.0.1:48333
|
||||||
|
zmqpubhashblock=tcp://127.0.0.1:48333
|
||||||
|
|
||||||
|
rpcworkqueue=1100
|
||||||
|
maxmempool=2000
|
||||||
|
dbcache=1000
|
||||||
Loading…
Reference in New Issue
Block a user