2022-03-26 03:42:55 +00:00
|
|
|
# LNDg Service
|
|
|
|
# /etc/systemd/system/lndg.service
|
|
|
|
|
|
|
|
[Unit]
|
|
|
|
Description=LNDg
|
|
|
|
Wants=www.service docker_images.service
|
|
|
|
After=www.service docker_images.service
|
|
|
|
|
|
|
|
[Service]
|
2022-04-29 04:07:13 +00:00
|
|
|
WorkingDirectory=/opt/mynode/lndg
|
|
|
|
|
2022-03-26 03:42:55 +00:00
|
|
|
ExecStartPre=/usr/bin/is_not_shutting_down.sh
|
2022-04-12 02:58:31 +00:00
|
|
|
ExecStartPre=/bin/bash -c 'if [ -f /usr/bin/service_scripts/pre_lndg.sh ]; then /bin/bash /usr/bin/service_scripts/pre_lndg.sh; fi'
|
2022-04-29 04:07:13 +00:00
|
|
|
ExecStart=/bin/bash -c "/opt/mynode/lndg/.venv/bin/supervisord && /opt/mynode/lndg/.venv/bin/python manage.py runserver 0.0.0.0:8889"
|
2022-04-12 02:58:31 +00:00
|
|
|
ExecStartPost=/bin/bash -c 'if [ -f /usr/bin/service_scripts/post_lndg.sh ]; then /bin/bash /usr/bin/service_scripts/post_lndg.sh; fi'
|
2022-04-29 04:07:13 +00:00
|
|
|
#ExecStop=TODO
|
2022-03-26 03:42:55 +00:00
|
|
|
|
|
|
|
# Need new user
|
2022-04-29 04:07:13 +00:00
|
|
|
User=lndg
|
|
|
|
Group=lndg
|
2022-03-26 03:42:55 +00:00
|
|
|
Type=simple
|
|
|
|
TimeoutSec=120
|
|
|
|
Restart=always
|
|
|
|
RestartSec=60
|
|
|
|
StandardOutput=syslog
|
|
|
|
StandardError=syslog
|
|
|
|
SyslogIdentifier=lndg
|
|
|
|
|
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target
|