matrixed99 wrote: 
> I've modified the /etc/systemd/system/mmserver.service but when I enable
> it, the init.d script fails and causes the mmserver.service to fail:
> 
> mmserver[4797]: /etc/init.d/mmserver: line 27:
> /opt/MusicMagicMixer/MusicMagicServer start & > /dev/null: No such file
> or directory
> mmserver.service: Unit entered failed state.
> Sep 04 01:37:12 sagsqueezebox systemd[1]: mmserver.service: Failed with
> result 'exit-code'.
> 
> I had to take the su - $USER -c part of the mmserver init.d script out
> because it resulted in the same error
> 
> Sorry my Linux skills are very basic, I can't seem to figure this out. 
> And thanks again for taking the time to help, your English is fine
> 
> matrixed99
I believe it's just a problem of file rights. Maybe you already checked
all this and sorry if I'll mention things that you already know.
The script must be run by a regular user, so the files rights should be
set accordingly. I noticed that vortex box uses root as the user to run
the script, but it's to be avoided. In case of a problem, a program run
by a standard user can't damage too much your system nor can be used as
a security breach.
You can notice that LMS owner is not root, but squeezeboxserver.
I noticed in your mmserver file you have the line
USER=m
I suppose m is not the right name of the user, but it has to be the real
user that will run the program. If not, you should correct it.
You should also leave the line :
su - $USER -c $MUSICHOME"MusicMagicServer start  & > /dev/null"
as it is, because it's fine.
It means that the executable MusicMagicServer will be run with user
$USER.
It's a bit strange that you can run it from a terminal but it fails at
startup.
You have to check that all files in  /opt/MusicMagicMixer/ either are
owned by $USER or this user has read and execute permissions on these
files.
Log in a terminal with the user login and check all files :

Code:
--------------------
    cd /opt/MusicMagicMixer/
  ls -la
--------------------
gives you files owners and rights. The first field is file rights. the
first letter is file type, then you have rights for owner 3 letters
(Read, Write, eXecute), group and world. Then you have user owner and
group owner. So if owner is $USER, then you should have -rwx...... in
rights for scripts and executables, -rw-... for other files, if not you
should have ....rwx (rwx at the end, for world). But I recommend to have
user owner and group owner is $USER for all files and directories.
To do this, open a terminal, log as root and type (replacing <user> by
the actual user):

Code:
--------------------
    cd /opt
  chown -R <user> MusicMagicMixer/
  chgrp -R <user> MusicMagicMixer/
--------------------


Hope this could help.
Regards



LMS 7.9.0
on Linux Mageia 5 and RPI 3
1 SB3, 2 radio, 1 touch
Plugins : Trackstat, Smartmix, MusicIP, ...
------------------------------------------------------------------------
Antoniop's Profile: http://forums.slimdevices.com/member.php?userid=39292
View this thread: http://forums.slimdevices.com/showthread.php?t=107886

_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/plugins

Reply via email to