codestation / qcma

Cross-platform content manager assistant for the PS Vita (No longer maintained)
GNU General Public License v3.0
550 stars 94 forks source link

init.d script for init.d-based systems #120

Closed IngwiePhoenix closed 5 years ago

IngwiePhoenix commented 5 years ago

Hello there!

It's kinda very long ago that I have actually made an init.d script, especially having forgotten the LSB tags that go at the top... But as I run my machine as a headless home-server, I would like to have QCMA start up, when it starts. It's an old Mac Mini running Ubuntu 18.04 now, so it would easily take scripts by the init.d format. Currently, I start qcma_cli via screen and just detach from the screen. This might be a viable method to really use for "daemonizing" it in a quick way.

Also, I could not seem to really find any CLI switches for configuring the search folders for media... Any plans on tidying up the CLI a little?

Kind regards, Ingwie

codestation commented 5 years ago

There are no switches currently implemented for the CLI, all the configuration is read from ~/.config/codestation/qcma.conf. There are already systemd unit files for both system and user modes, so you can modify them as you want.

You can configure qcma using the GUI then see the generated config file and modify it as needed for the CLI.

I won't add support for init.d scripts because every distro has their own format and the most biggest distros already migrated to systemd.

IngwiePhoenix commented 5 years ago

Ahh, okay - I can see that now :)

Unfortunately, I can not seem to get VNC to work with my Ubuntu 18.04, kinda unfortunate… Well, guess Ill have to go and just swap all my cables for a little to set up QCMA correctly.

Though, where would I copy the systemd files? I only really know how init.d works, so I am rather new to systemd...

Am 29.10.2018 um 04:15 schrieb codestation notifications@github.com:

There are no switches currently implemented for the CLI, all the configuration is read from ~/.config/codestation/qcma.conf. There are already systemd unit files for both system https://github.com/codestation/qcma/blob/master/systemd/system/qcma.service and user https://github.com/codestation/qcma/blob/master/systemd/user/qcma.service modes, so you can modify them as you want.

So you can configure qcma using the GUI then see the generated config file and modify it as needed for the CLI.

I won't add support for init.d scripts because every distro has their own format and the most biggest distros already migrated to systemd.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/codestation/qcma/issues/120#issuecomment-433776507, or mute the thread https://github.com/notifications/unsubscribe-auth/ACwnlMCIC41MDw0rP_scWEYzz8lmpxgHks5upnLpgaJpZM4X9uVM.

codestation commented 5 years ago

Use the system one and copy it to /etc/systemd/system/qcma.service. Create a qcma user (don't run it as root) and put the config file in /home/qcma/.config/codestation/qcma.conf or /etc/xdg/codestation/qcma.conf (edit the path in the service file if you go with the last one),

Enable the service with systemctl enable qcma and start it with systemctl start qcma.

Note: you can use your own user instead of qcma, i just put it because it shouldn't be run as root.

IngwiePhoenix commented 5 years ago

Thank you very much for your explanation! I had completely missed the email notification for your last post... sorry for that!

I have it working now on my Ubuntu maschine with 0.4.2. :)