PeteManchester / MediaPlayer

61 stars 20 forks source link

Add systemd Startscript #12

Closed triplem closed 9 years ago

triplem commented 10 years ago

To be able to run the MediaPlayer on System-Startup we should adopt the run.sh as well as provide a systemd start-script.

imgrant commented 10 years ago

I am a mostly silent consumer of this great project, but I should point out here that I already created a init script (and associated wrapper, which is essentially run.sh) - Pete has added these to the repository already, they are in the lib/application/scripts dir, and the wiki contains the requisite installation instructions.

triplem commented 10 years ago

Thanks for the hint, but this is not "systemd", which is used on ArchLinux and more and more other distros ;-)

imgrant commented 10 years ago

Ah, I see, fair enough :)

PeteManchester commented 10 years ago

Hi Markus...

Sounds like a good idea to have a script/service for startup that would cover all OSs

I'm still learning about linux so probably stupid questions, but here goes:

Which Operating systems would support systemd. Would Ians Scripts not work on other OS or just Wheezy. Does systemd work as a service similar to Ians, I find it very useful when deploying MediaPlayer updates from the Ant scripts to be able to start and stop MediaPlayer when copying new jar files.

Cheers,

Pete.

triplem commented 10 years ago

Right now, most Linux Systems already moved to Systemd as a Init-Daemon. IIRC Debian and Ubuntu will also move to Systemd during the upcoming releases. Therefore Systemd should be a quite safe bet on an Init-Daemon.

Right now Ians script (should) work on (nearly) all Linux-Systems, but you need to configure it correctly for this to work. Systemd has a slightly different approach here and therefor e.g. the rc.d directory does not really exists anymore (this is where the script is copied to).

I am not an "expert" on this topic as well, but I do thing that we should provide both, the LSB initscript as well as an systemd init-script. Then most of the distros should be covered (except probably Gentoo, I am unsure about this one, because they still support another init system).

PeteManchester commented 10 years ago

I had a play around with systemd and have created some very simple scripts, they are documented here https://github.com/PeteManchester/MediaPlayer/wiki/Using-'systemd'--for-the-MediaPlayer-service-controller

PeteManchester commented 10 years ago

The scripts are maybe a bit too simple, I've just noticed that on wheezy when using systemd the USB DACs are not initialized at boot time, it defaults to the audio out jack....

I suspect it's not my scripts but something else that means that the UDB DAC is not initialized, it's a bit of a show stopper at the moment though..

triplem commented 10 years ago

Sounds slightly unrelated. Is the USB DAC working without your script?

PeteManchester commented 10 years ago

No, it's not my script, it's something to do with systemd being used to start all processes I think, not really had time to investigate since..

On 23 March 2014 20:29, Markus M. May notifications@github.com wrote:

Sounds slightly unrelated. Is the USB DAC working without your script?

Reply to this email directly or view it on GitHubhttps://github.com/PeteManchester/MediaPlayer/issues/12#issuecomment-38396055 .