# LNBits service # /etc/systemd/system/lnbits.service [Unit] Description=LNBits Wants=bitcoin.service lnd.service After=bitcoin.service lnd.service [Service] ExecStartPre=/usr/bin/is_not_shutting_down.sh ExecStartPre=/usr/bin/is_mainnet.sh ExecStartPre=/usr/bin/wait_on_lnd.sh ExecStartPre=/usr/bin/service_pre/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