Antoniop wrote: 
> It's because you have 
> "su - $USER -c"
> in your script, and not sudo instead of su, as in frankd script.
> su prompts for a password, that's certainly why it doesn't work in the
> crontab, there's no password entered at run time. 
> At boot, because the user that runs mmserver script is root, the su
> command doesn't ask for a password to run the job as pi (I didn't know
> it, I just tried it).
> sudo works differently. It doesn't ask for a password if there is a rule
> in file /etc/sudoers that says so. /etc/sudoers is the rules file that
> says how to deal with sudo commands, according to users and commands. I
> didn't changed anything to this file.
> I have the original script (with su) and I had the same problems.
> So I changed the crontab with this :
> > 
Code:
--------------------
  >   > 0 1 * * * sudo service mmserver stop
  > 5 1 * * * sudo service mmserver start
--------------------
> > 
> 
> 
> It's strange, it doesn't work for me, I have the message "Sorry, user
> pi is not allowed to execute .."I have exactly the same problem with crontab 
> and the reason seems to be
that mmserver in init.d is not the same as the one in MusicMagicServer.
After copying it to the init.d folder it is then edited but the original
version (with su) is run in the crontab. 


Sent from my SM-G900F using Tapatalk




------------------------------------------------------------------------
slartibartfast's Profile: http://forums.slimdevices.com/member.php?userid=35609
View this thread: http://forums.slimdevices.com/showthread.php?t=106958

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

Reply via email to