Page 1 of 1

os.execute

Posted: Monday 22 April 2019 14:20
by Gianni
hello

can any1 tell my why os.execute not work for me?
i made a new pi user and deleted the pi user
i add the new user in the same groups as the pi user.

so when i try this it's not working.
i try as a test to create a dir but this is also not working?

Code: Select all

if (devicechanged['Radio'] == 'Off') then
    os.execute ("killall mplayer")
    print ("print off")
    os.execute ("sudo mkdir ~/off")
end

if (devicechanged['Radio'] == 'mnm') then
    os.execute("mplayer -noconsolecontrols http://icecast.vrtcdn.be/mnm-high.mp3 &> /dev/null")
    print ("print mnm")
    os.execute ("sudo mkdir ~/mnm")
.

grts