mynode/rootfs/standard/etc/systemd/system/lnbits.service
2021-03-04 22:50:35 -06:00

32 lines
854 B
Desktop File

# LNBits service
# /etc/systemd/system/lnbits.service
[Unit]
Description=LNBits
Wants=bitcoind.service lnd.service
After=bitcoind.service lnd.service
[Service]
ExecStartPre=/usr/bin/is_not_shutting_down.sh
ExecStartPre=/usr/bin/wait_on_lnd.sh
ExecStartPre=/usr/bin/mynode_pre_lnbits.sh
#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
WorkingDirectory=/opt/mynode/lnbits
ExecStart=/bin/sh -c 'cd /opt/mynode/lnbits && ./lnbits_venv/bin/hypercorn -k trio --bind 0.0.0.0:5000 "lnbits.app:create_app()"'
User=bitcoin
Group=bitcoin
Type=simple
TimeoutSec=120
Restart=always
RestartSec=30
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=lnbits
[Install]
WantedBy=multi-user.target