2020-07-08 03:13:01 +00:00
|
|
|
# LNBits service
|
|
|
|
# /etc/systemd/system/lnbits.service
|
2020-06-26 04:30:17 +00:00
|
|
|
|
|
|
|
[Unit]
|
|
|
|
Description=LNBits
|
2021-04-11 00:51:26 +00:00
|
|
|
Wants=bitcoin.service lnd.service
|
|
|
|
After=bitcoin.service lnd.service
|
2020-06-26 04:30:17 +00:00
|
|
|
|
|
|
|
[Service]
|
|
|
|
ExecStartPre=/usr/bin/is_not_shutting_down.sh
|
2021-03-14 06:20:56 +00:00
|
|
|
ExecStartPre=/usr/bin/is_mainnet.sh
|
2020-06-26 04:30:17 +00:00
|
|
|
ExecStartPre=/usr/bin/wait_on_lnd.sh
|
2022-02-13 03:59:04 +00:00
|
|
|
ExecStartPre=/usr/bin/service_pre/pre_lnbits.sh
|
2021-03-05 04:50:35 +00:00
|
|
|
#ExecStartPre=/bin/sh -c 'cd /opt/mynode/lnbits && /usr/local/bin/pipenv run flask migrate'
|
|
|
|
|
|
|
|
ExecStartPre=/bin/sh -c 'cd /opt/mynode/lnbits && ./lnbits_venv/bin/quart migrate'
|
|
|
|
#Environment=FLASK_ENV=development
|
2020-06-26 04:30:17 +00:00
|
|
|
WorkingDirectory=/opt/mynode/lnbits
|
|
|
|
|
2021-03-05 04:50:35 +00:00
|
|
|
ExecStart=/bin/sh -c 'cd /opt/mynode/lnbits && ./lnbits_venv/bin/hypercorn -k trio --bind 0.0.0.0:5000 "lnbits.app:create_app()"'
|
2020-06-26 04:30:17 +00:00
|
|
|
|
|
|
|
User=bitcoin
|
|
|
|
Group=bitcoin
|
|
|
|
Type=simple
|
2021-03-05 04:50:35 +00:00
|
|
|
TimeoutSec=120
|
2020-06-26 04:30:17 +00:00
|
|
|
Restart=always
|
2021-03-05 04:50:35 +00:00
|
|
|
RestartSec=30
|
2020-06-26 04:30:17 +00:00
|
|
|
StandardOutput=syslog
|
|
|
|
StandardError=syslog
|
|
|
|
SyslogIdentifier=lnbits
|
|
|
|
|
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target
|