kodi: use connmand-wait-online and rework service dependencies

This commit is contained in:
Lukas Rusak 2016-02-03 11:29:49 +01:00
parent 476db3cefd
commit 0ac03dde6c
4 changed files with 12 additions and 7 deletions

View File

@ -1,7 +1,7 @@
[Unit] [Unit]
Description=Kodi user autostart script Description=Kodi user autostart script
Before=kodi.service Before=kodi.service
After=graphical.target After=network-online.target graphical.target
ConditionPathExists=/storage/.config/autostart.sh ConditionPathExists=/storage/.config/autostart.sh
[Service] [Service]

View File

@ -1,16 +1,19 @@
[Unit] [Unit]
Description=Wait on network Description=Wait on network
Requisite=connman.service
After=connman.service After=connman.service
Before=kodi-autostart.service kodi.service Before=network-online.target
DefaultDependencies=no
Conflicts=shutdown.target
ConditionPathExists=/storage/.cache/openelec/network_wait ConditionPathExists=/storage/.cache/openelec/network_wait
[Service] [Service]
Type=oneshot Type=oneshot
EnvironmentFile=/storage/.cache/openelec/network_wait EnvironmentFile=/storage/.cache/openelec/network_wait
ExecStartPre=/bin/sh -c 'echo "waiting on Network to come online ... (max. $WAIT_NETWORK_TIME sec.)"' ExecStartPre=/bin/sh -c 'echo "waiting on Network to come online ... (max. $WAIT_NETWORK_TIME sec.)"'
ExecStart=/usr/bin/cm-online ${WAIT_NETWORK_TIME} ExecStart=/usr/sbin/connmand-wait-online --timeout=${WAIT_NETWORK_TIME}
StandardOutput=tty StandardOutput=tty
RemainAfterExit=yes RemainAfterExit=yes
[Install] [Install]
WantedBy=kodi.service WantedBy=network-online.target

View File

@ -1,7 +1,8 @@
[Unit] [Unit]
Description=Kodi Media Center Description=Kodi Media Center
After=graphical.target After=network-online.target graphical.target
Requires=graphical.target Requires=graphical.target
Wants=network-online.target
[Service] [Service]
Environment=DISPLAY=:0.0 Environment=DISPLAY=:0.0

View File

@ -1,7 +1,8 @@
[Unit] [Unit]
Description=Kodi Mediacenter Interface Description=Kodi Mediacenter Interface
Requires=multi-user.target graphical.target Requires=multi-user.target graphical.target network-online.target
After=graphical.target After=network-online.target graphical.target
Wants=network-online.target
Conflicts=rescue.target Conflicts=rescue.target
AllowIsolate=yes AllowIsolate=yes