SongKong Jaikoz

SongKong and Jaikoz Music Tagger Community Forum

Headless Linux Install

Run ./songkongremote.sh to complete installation and start songkong in remote mode

I had fully expected this would install a daemonized songkong compatible with init.d

It doesn’t do that, most users probably don’t want to run it indefinitently but I can see it would be useful, I have raised an issue to create a startup/shutdown script suitable for use with init.d - https://jthink.atlassian.net/browse/SONGKONG-2114

I have been trying to find a way to get this to work, it would be a great addition.

You mean a startup script?

Yes, I run songkongremote on a headless Linux box and it would add convenience if it would run like a daemon.

Can you give more details I’m not really that familiar with what that means.

Hey Paul,

This is an old post. I’m now working around the daemon requirement in an acceptable manner. I call the songkongremote.sh from a screen session which I can then detach from and then go about my other business.

Okay, but I could fix this properly if i understood the daemon requirement, what does script need to do. is it a separate script that has a stop and start part.

Thanks Paul,

Remember I am not the original poster here, but I can tell you my thoughts.

If you run songkongremote and then terminate the window with the command line in (I SSH into my Linux box), songkongremote terminates. I get around this by using screen which I can then detach from and then go about my other business while SongKong remains running.

It would be nice to not have to do this, hence my reply to the original post regarding daemonized songkongremote. I will take a stab at the requirements from my perspective.

  • SongKong Remote could be set to automatically start on boot/reboot of PC.
  • Potentially provide recovery in case of crash.
  • Provide ability for the user to stop/start/restart SongKong Remote.
  • SongKong Remote would remain in a running state even after termination of the CLI from where the startup script was called.

I hope that helps some.

I think I have simpler solution for you, just run

nohup songkongremote.sh  &

So & runs in background so get terminal cmd line back
nohup ensures it continues to run after closing window (all output go into nohup.out file)

This works too

screen -S SongKong
./songkongremote.sh
ctrl-a + d

Oh I see, didn’t realize screen was a command.

On Linux, you can create

/lib/systemd/system/songkongremote.service

Contents:

[Unit]
Description=SongKong Remote Server

[Service]
WorkingDirectory=/opt/songkong
ExecStart=/bin/bash /opt/songkong/songkongremote.sh

[Install]
WantedBy=multi-user.target

====================

1 Like