service unit updates
This commit is contained in:
parent
2d5936bd09
commit
74e9f61c40
@ -1,17 +1,39 @@
|
|||||||
[Unit]
|
[Unit]
|
||||||
Description=KlipperScreen
|
Description=KlipperScreen
|
||||||
After=moonraker.service
|
|
||||||
StartLimitIntervalSec=0
|
StartLimitIntervalSec=0
|
||||||
|
# Make sure we are started after logins are permitted. If Plymouth is
|
||||||
|
# used, we want to start when it is on its way out.
|
||||||
|
After=systemd-user-sessions.service plymouth-quit-wait.service
|
||||||
|
# On systems without virtual consoles, do not start.
|
||||||
|
ConditionPathExists=/dev/tty0
|
||||||
|
# D-Bus is necessary for contacting logind, which is required.
|
||||||
|
Wants=dbus.socket systemd-logind.service
|
||||||
|
After=dbus.socket systemd-logind.service
|
||||||
|
# Replace any (a)getty that may have spawned, since we log in
|
||||||
|
# automatically.
|
||||||
|
Conflicts=getty@%i.service
|
||||||
|
After=getty@%i.service
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
Restart=always
|
Restart=always
|
||||||
RestartSec=1
|
RestartSec=2
|
||||||
User=KS_USER
|
User=KS_USER
|
||||||
SupplementaryGroups=klipperscreen
|
SupplementaryGroups=klipperscreen
|
||||||
WorkingDirectory=KS_DIR
|
WorkingDirectory=KS_DIR
|
||||||
Environment="KS_XCLIENT=KS_ENV/bin/python KS_DIR/screen.py"
|
Environment="KS_XCLIENT=KS_ENV/bin/python KS_DIR/screen.py"
|
||||||
ExecStart="KS_DIR/scripts/KlipperScreen-start.sh"
|
ExecStart="KS_DIR/scripts/KlipperScreen-start.sh"
|
||||||
|
|
||||||
|
# Log this user with utmp, letting it show up with commands 'w' and
|
||||||
|
# 'who'. This is needed since we replace (a)getty.
|
||||||
|
UtmpIdentifier=%I
|
||||||
|
UtmpMode=user
|
||||||
|
# A virtual terminal is needed.
|
||||||
|
TTYPath=/dev/%I
|
||||||
|
TTYReset=yes
|
||||||
|
TTYVHangup=yes
|
||||||
|
TTYVTDisallocate=yes
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
DefaultInstance=tty7
|
||||||
|
Loading…
x
Reference in New Issue
Block a user