savonet / liquidsoap-daemon

Daemonization scripts for liquidsoap
37 stars 11 forks source link

Daemon doesn't work #34

Open KevanGP opened 1 year ago

KevanGP commented 1 year ago

[UPDATE] I fixed it. Can't remember what exactly fixed it but I had to change some file permissions to +rwx and also added the following lines to the top of my Liquidsoap script.

!/usr/bin/liquidsoap

Log dir

log.file.path.set("/tmp/basic-radio.log")

set("init.allow_root",true) set("server.telnet", false) set("server.telnet.port", 1234) set("harbor.bind_addr","0.0.0.0")

[ORIGINAL POST] The daemon won't work. I get the following with systemctl status main-liquidsoap.

" × main-liquidsoap.service - main Liquidsoap daemon
Loaded: loaded (/etc/systemd/system/main-liquidsoap.service; enabled; vend> Active: failed (Result: exit-code) since Mon 2022-07-25 19:38:35 UTC; 31s > Docs: http://liquidsoap.fm/
Process: 14024 ExecStart=/root/.opam/default/bin/liquidsoap /home/kev/liqui> CPU: 732ms

Jul 25 19:38:35 localhost systemd[1]: main-liquidsoap.service: Control process > Jul 25 19:38:35 localhost systemd[1]: main-liquidsoap.service: Failed with resu> Jul 25 19:38:35 localhost systemd[1]: Failed to start main Liquidsoap daemon.
Jul 25 19:38:35 localhost systemd[1]: main-liquidsoap.service: Scheduled restar> Jul 25 19:38:35 localhost systemd[1]: Stopped main Liquidsoap daemon.
Jul 25 19:38:35 localhost systemd[1]: main-liquidsoap.service: Start request re> Jul 25 19:38:35 localhost systemd[1]: main-liquidsoap.service: Failed with resu> Jul 25 19:38:35 localhost systemd[1]: Failed to start main Liquidsoap daemon. "

What is resu>?

KevanGP commented 1 year ago

It also says to try "journalctl -xeu main-liquidsoap.service", but when I do that I get logs from several days ago. TBH I reinstalled Liquidsoap earlier, so that may have broken things. But if I run liquidsoap without the daemon it works fine.

KevanGP commented 1 year ago

I just figured it out when installing it on another device. You have to run the following to make it work, assuming the name of your script file is "main.liq". sudo sh /path-to/daemonize-liquidsoap.sh main

The readme didn't say run it as root, but at least it works.