Add systemd support

This commit is contained in:
Aleksey Filippov 2025-03-11 22:21:33 +04:00
parent 6919b5c4a4
commit 3a03be0fb1
3 changed files with 18 additions and 0 deletions

16
dt-cart/dt-cart.service Normal file
View 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
View File

@ -0,0 +1,2 @@
#!/bin/sh
poetry run service.run > /var/log/athene/dt-cart-$(date +%Y-%m-%d-%H-%M-%S).log &