Forum
  • Search
  • Member List
  • Calendar
Hello There, Guest! Login Register — Login with Facebook

Different Shutdown process from Kodi or ssh
Thank you for your donation

Thread Closed 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Threaded Mode | Linear Mode
Different Shutdown process from Kodi or ssh
27th Apr, 2020, 05:09 AM
Post: #6
Nachteule Offline
Administrator
******
Posts: 2,407
Joined: Dec 2014
Reputation: 122
RE: Different Shutdown process from Kodi or ssh
(27th Apr, 2020 03:29 AM)Gauner Wrote:  Ok, thank you very much for clarification.
I already opened a issue on github.
I added there my finding about the different ways that the system changes the runlevel when shutdown from Kodi.

Is there a similar folder like /lib/systemd/system-shutdown that executes scripts at startup? Or is my consideration correct, that startup scripts must go into the rc?.d or rc.local, while shutdown scripts go into /lib/systemd/system-shutdown? So, there's no consistent way of executing a script on startup and shutdown?

I've already seen you issue on github

I looked deeper into today and it seems that elogind is the culprit. Can't say if the version is too old (its the version shipped with buster, on giithub are oc newer versions matching with systemd versioning), or if just elogind is wrong configured.

Anyway, I have a test installation running without elogind, using logind from systemd, looks ok so far. Shutdown from Kodi works as expected (AFAIS)

I don't know if there is a startup folder similar to shutdown folder, I would assume there isn't though. And yes, I think you're right to put startup script into rc.local if required or look into file /etc/default/xbmc, variable USERRUN. maybe you can wrote your own userrun script

For a quick test, you can replace /etc/init/elogind.conf with
Code:
description "Enable user and session management by systemd/(e)logind"
author      "mkreisl mkreisl@xbian.org"

env EDAEMON=/lib/elogind/elogind
env SDAEMON=/lib/systemd/systemd-logind

start on started dbus and remote-filesystems
stop on starting rc RUNLEVEL=[06]

respawn

script
    if [ -e $SDAEMON ]; then
        DAEMON=$SDAEMON
    elif [ -e $EAEMON ]; then
        DAEMON=$EDAEMON
    fi
    test -e $DAEMON && exec $DAEMON || { stop; exit 0; }
end script

and install systemd (/lib/systemd/systemd-logind is provided by systemd)
Find all posts by this user
« Next Oldest | Next Newest »
Thread Closed 


Messages In This Thread
Different Shutdown process from Kodi or ssh - Gauner - 24th Apr, 2020, 04:14 AM
RE: Different Shutdown process from Kodi or ssh - Gauner - 26th Apr, 2020, 12:39 AM
RE: Different Shutdown process from Kodi or ssh - Gauner - 26th Apr, 2020, 04:19 AM
RE: Different Shutdown process from Kodi or ssh - Nachteule - 26th Apr, 2020, 11:37 PM
RE: Different Shutdown process from Kodi or ssh - Gauner - 27th Apr, 2020, 03:29 AM
RE: Different Shutdown process from Kodi or ssh - Nachteule - 27th Apr, 2020 05:09 AM
RE: Different Shutdown process from Kodi or ssh - Gauner - 29th Apr, 2020, 01:23 AM
RE: Different Shutdown process from Kodi or ssh - sarahroxon9 - 18th Apr, 2022, 01:38 AM

Possibly Related Threads...
Thread: Author Replies Views: Last Post
  xbian-config doesn't show kodi process running.... Skywatch 5 15,834 14th Feb, 2015 11:10 PM
Last Post: Smultie

  • View a Printable Version
  • Send this Thread to a Friend
  • Subscribe to this thread
Forum Jump:

Current time: 19th Jul, 2025, 06:26 PM Powered By MyBB, © 2002-2025 MyBB Group.