Add systemd support
This commit is contained in:
parent
6919b5c4a4
commit
3a03be0fb1
16
dt-cart/dt-cart.service
Normal file
16
dt-cart/dt-cart.service
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Classification and Regression Trees (CART) Service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=forking
|
||||||
|
WorkingDirectory=/opt/dt-cart
|
||||||
|
ExecStart=/opt/dt-cart/service.run
|
||||||
|
ExecStop=/bin/kill -TERM $MAINPID
|
||||||
|
Restart=on-abnormal
|
||||||
|
TimeoutSec=900
|
||||||
|
|
||||||
|
User=athene
|
||||||
|
Group=athene
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
2
dt-cart/service.run
Normal file
2
dt-cart/service.run
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
poetry run service.run > /var/log/athene/dt-cart-$(date +%Y-%m-%d-%H-%M-%S).log &
|
Loading…
x
Reference in New Issue
Block a user