Added systemd support.

This commit is contained in:
Преподобный Ален
2025-05-03 22:06:54 +03:00
parent 0182cb46fd
commit 6c03ba4cd2
2 changed files with 29 additions and 2 deletions

21
auto/unit.service Normal file
View File

@@ -0,0 +1,21 @@
[Unit]
Description=Deal Module
After=network.target remote-fs.target nss-lookup.target
[Service]
Type=forking
PIDFile=/run/dm.pid
# dm will fail to start if /run/dm.pid already exists but has the wrong
# SELinux context. This might happen when running `dm -t` from the cmdline.
# https://bugzilla.redhat.com/show_bug.cgi?id=1268621
ExecStartPre=/usr/bin/rm -f /run/dm.pid
ExecStartPre=/usr/sbin/dm -t
ExecStart=/usr/sbin/dm
ExecReload=/bin/kill -s HUP $MAINPID
KillSignal=SIGQUIT
TimeoutStopSec=5
KillMode=mixed
PrivateTmp=true
[Install]
WantedBy=multi-user.target