Auto-start program at boot time

Hello,

I am trying to autostart a software (Cherrymusic, a music server) at boot on a Raspberry Pi 2

I have written several script and they all are working fine but not at boot.
I add them to the boot process with this command : “update-rc.d cherrymusic-start.sh defaults”

But it never works : what have I missed?

P.S. : sorry if my english is not good, I am french

I don’t know if I can solve your issue, but I know we will need to know which version of Ubuntu MATE you are using, because 14.04 uses upstart while newer Ubuntu versions use systemd.

Hello

I use the latest version = 15.10

Have you tried Startup Applications > Add in the Control Center?:

I’m not an expert in this area at all, but I know systemd directly uses unit files which are different from SysV init scripts. It can run SysV scripts via systemd-sysv-generator, but it does what the name says, generate a systemd unit. You might want to look into creating a native systemd unit file.

Hello,

I have tried Startup Applications > Add in the Control Center but it does not work

There is a “cherrymusicd” file in the CherryMusic folder : is it a systemd unit file?

I’m not familiar with CherryMusic myself, but their setup guide on Github does have a section about an included systemd service file and what to do with it.

I have been using CherryMusic for many years and I too wanted have CherryMusic autostart at boot up during power outages. I have attached the .sh script that I created and it works for me. You will need to verify and make changes to CherryMusic’s file name and location to match the script for it to work. Then add CherryMusic in Startup Applications Preferences (Per wolfman)…DONE!!

NOTE: The terminal window must stay open. Closing the terminal window will stop the CherryMusic server.

FYI…the cherrymusicd file is only good for Arch Linux.