Re-arrange ovos systemd services

This commit is contained in:
j1nx 2022-11-17 20:32:24 +01:00
parent f11a8ca827
commit e3f9139ea1
12 changed files with 54 additions and 10 deletions

View File

@ -2,13 +2,13 @@
Description=Admin PHAL Description=Admin PHAL
[Service] [Service]
Type=notify #Type=notify
ExecStart=/usr/libexec/mycroft-systemd-admin-phal ExecStart=/usr/libexec/mycroft-systemd-admin-phal
TimeoutStartSec=1m #TimeoutStartSec=1m
TimeoutStopSec=1m #TimeoutStopSec=1m
Restart=on-failure Restart=on-failure
StartLimitInterval=5min #StartLimitInterval=5min
StartLimitBurst=4 #StartLimitBurst=4
#StartLimitAction=reboot-force #StartLimitAction=reboot-force
#WatchdogSec=30s #WatchdogSec=30s

View File

@ -1,9 +1,14 @@
[Unit] [Unit]
Description=Connect your OVOS-Device to your smartphone or tablet Description=Connect your OVOS-Device to your smartphone or tablet
Wants=sound.target
After=sound.target
Wants=network-online.target
After=network-online.target
After=pulseaudio.service
[Service] [Service]
ExecStart=/usr/lib/libexec/kdeconnectd -platform offscreen ExecStart=/usr/lib/libexec/kdeconnectd -platform offscreen
BusName=org.kde.kdeconnect BusName=org.kde.kdeconnect
[Install] [Install]
WantedBy=multi-user.target WantedBy=default.target

View File

@ -3,6 +3,7 @@ Description=Mycroft Audio
PartOf=mycroft.service PartOf=mycroft.service
After=mycroft.service After=mycroft.service
After=mycroft-messagebus.service After=mycroft-messagebus.service
After=pulseaudio.service
[Service] [Service]
Type=notify Type=notify

View File

@ -3,6 +3,7 @@ Description=Mycroft Enclosure
PartOf=mycroft.service PartOf=mycroft.service
After=mycroft.service After=mycroft.service
After=mycroft-messagebus.service After=mycroft-messagebus.service
After=pulseaudio.service
[Service] [Service]
Type=notify Type=notify

View File

@ -19,4 +19,4 @@ StandardOutput=null
Restart=on-failure Restart=on-failure
[Install] [Install]
WantedBy=mycroft.service WantedBy=default.target

View File

@ -3,6 +3,7 @@ Description=Mycroft PHAL
PartOf=mycroft.service PartOf=mycroft.service
After=mycroft.service After=mycroft.service
After=mycroft-messagebus.service After=mycroft-messagebus.service
After=pulseaudio.service
[Service] [Service]
Type=notify Type=notify

View File

@ -3,6 +3,7 @@ Description=Mycroft Skills
PartOf=mycroft.service PartOf=mycroft.service
After=mycroft.service After=mycroft.service
After=mycroft-messagebus.service After=mycroft-messagebus.service
After=pulseaudio.service
[Service] [Service]
Type=notify Type=notify

View File

@ -3,6 +3,7 @@ Description=Mycroft Voice
PartOf=mycroft.service PartOf=mycroft.service
After=mycroft.service After=mycroft.service
After=mycroft-messagebus.service After=mycroft-messagebus.service
After=pulseaudio.service
[Service] [Service]
Type=notify Type=notify
@ -19,4 +20,3 @@ StartLimitBurst=4
[Install] [Install]
WantedBy=mycroft.service WantedBy=mycroft.service

View File

@ -0,0 +1,35 @@
[Unit]
Description=Sound Service
# We require pulseaudio.socket to be active before starting the daemon, because
# while it is possible to use the service without the socket, it is not clear
# why it would be desirable.
#
# A user installing pulseaudio and doing `systemctl --user start pulseaudio`
# will not get the socket started, which might be confusing and problematic if
# the server is to be restarted later on, as the client autospawn feature
# might kick in. Also, a start of the socket unit will fail, adding to the
# confusion.
#
# After=pulseaudio.socket is not needed, as it is already implicit in the
# socket-service relationship, see systemd.socket(5).
Requires=pulseaudio.socket
ConditionUser=!root
[Service]
ExecStart=/usr/bin/pulseaudio --daemonize=no --log-target=journal
LockPersonality=yes
MemoryDenyWriteExecute=yes
NoNewPrivileges=yes
RestartSec=5
Restart=on-failure
RestrictNamespaces=yes
SystemCallArchitectures=native
SystemCallFilter=@system-service
# Note that notify will only work if --daemonize=no
Type=notify
UMask=0077
[Install]
Also=pulseaudio.socket
WantedBy=default.target

View File

@ -12,4 +12,4 @@ Restart=always
RestartSec=5 RestartSec=5
[Install] [Install]
WantedBy=multi-user.target WantedBy=default.target

View File

@ -13,4 +13,4 @@ Restart=always
RestartSec=5 RestartSec=5
[Install] [Install]
WantedBy=multi-user.target WantedBy=default.target