This is a script to start, stop and access cmus, a powerful console music player, as well as the web-remote-control-server cmus_app detached to a screen.
You can quickly send some commands while cmus is in background or use the webinterface.
It comes with a systemd.service in order to automatically run as a daemon at machine-startup.
You need, of course, all the stuff that it's about cmus, screen and cmus_app
Note: this is supposed to just work. Paths don't necessarily need to be your home-folder.
Installing dependencies in debian:
$ sudo apt install cmus cmus-plugin-ffmpeg screen
$ cd ~
$ git clone git://github.com/ichier/cmus_app
- Run
cmusand set a password on options-screen. - Edit
./cmus_app/configaccording to your needs, don't forget the password.
First, navigate to the folder you want the program in, get cmusd, put a symlink to /usr/bin and create your config file:
$ cd ~
$ git clone git://github.com/ichier/cmus_daemon
$ cd ./cmus_daemon
$ ln -s ./cmusd /usr/bin/cmusd
$ ln -s ./cmusr /usr/bin/cmusr
$ cp ./cmusd.service.conf ./cmusd.conf
- Now edit
./cmusd.confaccording to your needs.
At least do the password and replace all occurences of myusername to your username. That will be the owner of the screens created.
First, create the service-file:
$ cp ./cmusd.service.example ./cmusd.service
- Now edit
./cmusd.serviceby changing all occurences of myusername.
Continue with creating a symlink to /etc/systemd/system, enabling and starting it:
$ ln -s ./cmusd.service /etc/systemd/system/cmusd.service
$ systemctl enable cmusd
$ systemctl start cmusd
- just type
cmusdwithout parameters to get help.
Most useful:
cmusd startto start in backgroundcmusd stopto stopcmusd pto start playbackcmusd gto get cmus screen (ctrl-a+dto detach)cmusd rwto restart webserver (sometimes hangs)cmusd dstto show systemd-status of cmusd
tested on a ubuntu server 19.10