MycroftOS: Let all services know they are starting to psplash.

This commit is contained in:
Peter Steenbergen 2020-04-15 10:00:27 +02:00
parent 3bc68902ae
commit 17623d4f52
13 changed files with 19 additions and 5 deletions

View File

@ -10,6 +10,7 @@ ConditionPathExists=/etc/firstboot
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStartPre=/bin/psplash-write "MSG Preparing for first boot"
ExecStart=/usr/sbin/firstboot
[Install]

View File

@ -5,6 +5,7 @@ Before=avahi-daemon.service
[Service]
Type=oneshot
ExecStartPre=/bin/psplash-write "MSG Setting up hostname"
ExecStart=/bin/sh -c "hostnamectl set-hostname MycroftOS-`sed 's/://g' /sys/class/net/eth0/address | tail -c 7`"
[Install]

View File

@ -6,6 +6,8 @@ After=mycroft.service
[Service]
User=mycroft
WorkingDirectory=/home/mycroft
ExecStartPre=/bin/psplash-write "MSG Starting Mycroft A.I. audio service"
ExecStartPre=/bin/sleep 2
ExecStart=mycroft-audio
StandardOutput=file:/var/log/mycroft/audio.log
StandardError=file:/var/log/mycroft/audio.error.log

View File

@ -7,6 +7,8 @@ After=mycroft-messagebus.service
[Service]
User=mycroft
WorkingDirectory=/home/mycroft
ExecStartPre=/bin/psplash-write "MSG Starting Mycroft A.I. enclosure service"
ExecStartPre=/bin/sleep 2
ExecStart=mycroft-enclosure-client
StandardOutput=file:/var/log/mycroft/enclosure.log
StandardError=file:/var/log/mycroft/enclosure.error.log

View File

@ -6,6 +6,8 @@ After=mycroft.service
[Service]
User=mycroft
WorkingDirectory=/home/mycroft
ExecStartPre=/bin/psplash-write "MSG Starting Mycroft A.I. messagebus service"
ExecStartPre=/bin/sleep 2
ExecStart=mycroft-messagebus
StandardOutput=file:/var/log/mycroft/bus.log
StandardError=file:/var/log/mycroft/bus.error.log

View File

@ -6,6 +6,8 @@ After=mycroft.service
[Service]
User=mycroft
WorkingDirectory=/home/mycroft
ExecStartPre=/bin/psplash-write "MSG Starting Mycroft A.I. skills service"
ExecStartPre=/bin/sleep 2
ExecStart=mycroft-skills
StandardOutput=file:/var/log/mycroft/skills.log
StandardError=file:/var/log/mycroft/skills.error.log

View File

@ -6,6 +6,8 @@ After=mycroft.service
[Service]
User=mycroft
WorkingDirectory=/home/mycroft
ExecStartPre=/bin/psplash-write "MSG Starting Mycroft A.I. voice service"
ExecStartPre=/bin/sleep 2
ExecStart=mycroft-speech-client
StandardOutput=file:/var/log/mycroft/voice.log
StandardError=file:/var/log/mycroft/voice.error.log

View File

@ -1,17 +1,14 @@
[Unit]
Description=Mycroft A.I. Software stack.
After=pulseaudio.service
After=network-online.target
[Service]
User=mycroft
WorkingDirectory=/home/mycroft
Type=oneshot
ExecStartPre=fbv -f -d 1 /opt/mycroft/splash/logo.png > /dev/null 2>&1
ExecStartPre=/bin/bash -c 'fbv -f -d 1 /opt/mycroft/splash/waiting.png > /dev/null 2>&1;\
while ! ping -q -c 1 -W 1 1.1.1.1 >/dev/null 2>&1; do sleep 1; done'
ExecStartPre=/bin/psplash-write "MSG Starting Mycroft A.I. software stack"
ExecStartPre=/bin/sleep 2
ExecStart=/bin/true
ExecStartPost=fbv -f -d 1 /opt/mycroft/splash/logo.png > /dev/null 2>&1
RemainAfterExit=yes
[Install]

View File

@ -8,6 +8,7 @@ Before=sysinit.target shutdown.target
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStartPre=/bin/psplash-write "MSG Preparing system"
ExecStart=/usr/sbin/prepare_system
[Install]

View File

@ -5,6 +5,7 @@ After=alsa-restore.service
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStartPre=/bin/psplash-write "MSG Preparing respeaker configuration"
ExecStart=/usr/bin/seeed-voicecard
User=root

View File

@ -6,6 +6,7 @@ After=network.target time-sync.target sound.target avahi-daemon.service
[Service]
EnvironmentFile=-/etc/snapcast/snapclient
ExecStartPre=/bin/psplash-write "MSG Starting Snapcast client"
ExecStart=/usr/bin/snapclient $SNAPCLIENT_OPTS
# very noisy on stdout
StandardOutput=null

View File

@ -6,6 +6,7 @@ After=network.target time-sync.target avahi-daemon.service
[Service]
EnvironmentFile=-/etc/snapcast/snapserver
ExecStartPre=/bin/psplash-write "MSG Starting Snapcast server"
ExecStart=/usr/bin/snapserver $SNAPSERVER_OPTS
Restart=on-failure

View File

@ -9,6 +9,7 @@ After=pulseaudio.service
[Service]
Type=simple
ExecStartPre=/bin/psplash-write "MSG Starting Spotify connect"
ExecStart=/usr/bin/spotifyd --no-daemon
Restart=always
RestartSec=5