Jump to content


Photo

user script on green button.


  • Please log in to reply
93 replies to this topic

Re: user script on green button. #41 sjlouis

  • Senior Member
  • 1,538 posts

+3
Neutral

Posted 7 November 2014 - 21:10

Ok I will test it but I have a question. This is my script :

 

echo "Transfert Being Human"
mv /media/hdd/movie/Series/*"Being Human"* /media/sdc2/movie/Series
echo " "

echo "Sauvegarde fichiers"
rsync -ortuv --delete --exclude=/movie/.Trash /media/hdd/movie /media/sdc1

 

I do a few move and it works but rsync is not executed. I thought there was a problem with the "new" directory of the script but I launched it in /etc/shellscripts and it runs well. As the Hotkey windows closes immediately, I don't know why the script doesn't execute rsync.

 

Have you an idea?

 

Thank you :) .


Vu+ Ultimo 4K - OpenPli 8.3

Xtrend ET9200 - OpenPli 6.2


Re: user script on green button. #42 sjlouis

  • Senior Member
  • 1,538 posts

+3
Neutral

Posted 7 November 2014 - 21:17

I can see I have theses messages in this new directory.

 

rsync: failed to set times on "/media/sdc1/movie/Alex": Read-only file system (30)

 

I think it's the reason why it is not executed by Hotkey.


Vu+ Ultimo 4K - OpenPli 8.3

Xtrend ET9200 - OpenPli 6.2


Re: user script on green button. #43 sjlouis

  • Senior Member
  • 1,538 posts

+3
Neutral

Posted 7 November 2014 - 21:33

It doesn't work also in the original directory. Perhaps there is a problem with chmod 755 sauvedemo.sh.


Edited by sjlouis, 7 November 2014 - 21:34.

Vu+ Ultimo 4K - OpenPli 8.3

Xtrend ET9200 - OpenPli 6.2


Re: user script on green button. #44 sjlouis

  • Senior Member
  • 1,538 posts

+3
Neutral

Posted 7 November 2014 - 21:38

The script doesn't work since my OpenPli update yesterday. Something have changed. I don't know what.


Vu+ Ultimo 4K - OpenPli 8.3

Xtrend ET9200 - OpenPli 6.2


Re: user script on green button. #45 sjlouis

  • Senior Member
  • 1,538 posts

+3
Neutral

Posted 7 November 2014 - 22:18

I tried to do restart the box and it works :blink: . Ok, I don't know what was bad. Sometimes I have problems with the esata disk. And I haven't to "chmod" the file.

 

I will try tomorrow what you gave me.

 

Thank you :) .


Vu+ Ultimo 4K - OpenPli 8.3

Xtrend ET9200 - OpenPli 6.2


Re: user script on green button. #46 Pike_Bishop

  • Senior Member
  • 1,139 posts

+74
Good

Posted 7 November 2014 - 22:54

Hi sjlouis,

rsync -ortuv --delete --exclude=/movie/.Trash /media/hdd/movie /media/sdc1

it's better you use complete paths in scripts (i don't know where rsync is on your box) but as example as rsync would be in /usr/bin

then use;

/usr/bin/rsync -ortuv --delete --exclude=/movie/.Trash /media/hdd/movie /media/sdc1 

 

I tried to do restart the box and it works :blink:

that sounds good :)

 

 

Sometimes I have problems with the esata disk.

yes this is maybe the problem, because that;

rsync: failed to set times on "/media/sdc1/movie/Alex": Read-only file system (30)

says you have no rights to write on this filesystem.

 

 

regards

Biki3


Receiver: VU Ultimo 4K, Octagon SF8008 4K, Gigablue Quad 4K

Image: OpenPLI-8.3


Re: user script on green button. #47 sjlouis

  • Senior Member
  • 1,538 posts

+3
Neutral

Posted 8 November 2014 - 10:13

I don't remember exactly  but I think rsync is in a repertory where there is a path and we can launch it everywhere. I've verified when I used it.

 

I don't understand why rsync didn't work while the previous command mv has worked. It confused me. And this night, I remembered there was the same problem when the box doesn't see the esata disk. It can't write on the disk (what is normal because it doesn't see it, it's the same think the disk doesn't exist) but it does the same thing as if it writes and it takes the same time. Very strange.

 

It's a little complex to connect an esata disk. It's not possible if the internal disk sleeps. It's not possible if the internal disk is used to record... I have often to restart the box but it doesn't work at every restart :( .

 

And now it works fine :P .

 

And can you explain what is the utility of : type = 1 in your command?

 

wget "http://XXX.XXX.XXX.X...e=1&timeout=15"

 

 

Now I have to test your ideas to know if the script has ended.

 

Littlesat, what is the interest of the initial windows? Because it closes as soon as we press on "Ok".

 

Thank you, I'm happy :) .


Vu+ Ultimo 4K - OpenPli 8.3

Xtrend ET9200 - OpenPli 6.2


Re: user script on green button. #48 mackguil

  • Senior Member
  • 158 posts

0
Neutral

Posted 8 November 2014 - 14:13

Thanks for all the modification, scripts work fine for me and very usefull.

 

Thanks SJ louis for the return on homecinema.fr  ;)



Re: user script on green button. #49 greatred

  • Senior Member
  • 268 posts

+2
Neutral

Posted 8 November 2014 - 14:33

Can someone test a script with "ssh" or "scp" commands inside ?

Although I have a shared the keys with destination host and can connect without password from command line, doing the same inside a script launched with the remote is failing.



Re: user script on green button. #50 mackguil

  • Senior Member
  • 158 posts

0
Neutral

Posted 8 November 2014 - 14:40

SSH work perfectly in my script with private key, no logging with password was needed and key work well.



Re: user script on green button. #51 Pike_Bishop

  • Senior Member
  • 1,139 posts

+74
Good

Posted 8 November 2014 - 14:55

Hi sjlouis,

 

 

And can you explain what is the utility of : type = 1 in your command?

 

 

Message

Requests:

 

hxxp://dreambox/web/message?text={messagetext}&type={messagetype}&timeout={messagetimeout}

Parameter:

messagetext=Text of Message
messagetype=Number from 0 to 3, 0= Yes/No, 1= Info, 2=Message, 3=Attention
timeout=Can be empty or the Number of seconds the Message should disappear after.

it's messagetyp what you want to know number 0 - 3

you can find this infos also here;

http://dream.reichho...terface#Message

 

 

 

it's a little complex to connect an esata disk. It's not possible if the internal disk sleeps. It's not possible if the internal disk is used to record... I have often to restart the box but it doesn't work at every restart :( .

with the box in your sig the et9200 ?

i have also a esata disk in a revoltec aluguard 3,5  inches case on my et9000 which is permanent wired with the box;

http://geizhals.at/e...47-a268736.html

i can switch these hdd with a button on the case on or off and i didn't have the same problems as you with your esata disc - it works good.

 

 

regards

Biki3


Edited by Biki3, 8 November 2014 - 15:00.

Receiver: VU Ultimo 4K, Octagon SF8008 4K, Gigablue Quad 4K

Image: OpenPLI-8.3


Re: user script on green button. #52 greatred

  • Senior Member
  • 268 posts

+2
Neutral

Posted 8 November 2014 - 15:03

SSH work perfectly in my script with private key, no logging with password was needed and key work well.

 

Are you using ssh from openssh or the one from dropbear ?

I`m using dbclient instead of ssh.



Re: user script on green button. #53 Pike_Bishop

  • Senior Member
  • 1,139 posts

+74
Good

Posted 8 November 2014 - 15:41

Hi littlesat,

 

 

Shall i change the scripts directory to /usr/scripts?

 

hmm, ok i changed my mind - if it's not to much work please can you change the dir for hotkey scripts /etc/shellscripts to /usr/script ?

it works perfect also if i have the scripts in ppanel dir /usr/script with a symlink as;

ln -s /usr/script /etc/shellscripts

but if i didn't need a symlink i think it's better and so we can use ppanel scripts wih .xml and hotkey with scripts out of the box parallel.

if you want to do this - a lot of thanks :) , otherwise it's ok too.

 

 

regards

Biki3


Receiver: VU Ultimo 4K, Octagon SF8008 4K, Gigablue Quad 4K

Image: OpenPLI-8.3


Re: user script on green button. #54 blzr

  • PLi® Core member
  • 2,269 posts

+118
Excellent

Posted 8 November 2014 - 16:00

hmm, ok i changed my mind


@littlesat had somehow anticipated this, apparently ;)
http://sourceforge.n...c2513bf2cb2e0a/


True sarcasm doesn't need green font...

Re: user script on green button. #55 Pike_Bishop

  • Senior Member
  • 1,139 posts

+74
Good

Posted 8 November 2014 - 16:20

Hi blzr,

 

thanks for this great info, and many thanks to @littlesat for that :)

 

regards

Biki3


Edited by Biki3, 8 November 2014 - 16:20.

Receiver: VU Ultimo 4K, Octagon SF8008 4K, Gigablue Quad 4K

Image: OpenPLI-8.3


Re: user script on green button. #56 sjlouis

  • Senior Member
  • 1,538 posts

+3
Neutral

Posted 8 November 2014 - 17:40

Hum if littlesat makes us jokes by changing the directory without warning :wacko: :D ...

 

Biki3, I connect the esata disk only when I do my backups. I prefer to put it in another space to avoid to lost the 2 disks if a thief takes the box (and other things) :wacko: .

 

Thank you for the web link, it's interesting :) .


Vu+ Ultimo 4K - OpenPli 8.3

Xtrend ET9200 - OpenPli 6.2


Re: user script on green button. #57 sjlouis

  • Senior Member
  • 1,538 posts

+3
Neutral

Posted 8 November 2014 - 18:31

Wonderful, we can add several scripts on the same button, it's great :P .

 

And wget works fine :lol: . And if I don't write "timeout", the message keeps on the screen or on the screen of the box if the box sleeps. Good. Just a surprise, I can't start the box when the message is on the screen box, I have to press "Exit" and the message disappears, I didn't know it can receive other commands in stanby. I was afraid it has crashed.

 

Thank you very much all guys :) .


Vu+ Ultimo 4K - OpenPli 8.3

Xtrend ET9200 - OpenPli 6.2


Re: user script on green button. #58 littlesat

  • PLi® Core member
  • 56,612 posts

+694
Excellent

Posted 8 November 2014 - 18:44

Sorry for not warning you... but some posts before I already warned that I was considering this. It took some time before I committed it...


WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: user script on green button. #59 sjlouis

  • Senior Member
  • 1,538 posts

+3
Neutral

Posted 8 November 2014 - 20:20

Perhaps I've not understood : I did an update and I transferred my scripts under /etc/script but it didn't work. Then I created again /etc/shellscripts and it works.


Vu+ Ultimo 4K - OpenPli 8.3

Xtrend ET9200 - OpenPli 6.2


Re: user script on green button. #60 littlesat

  • PLi® Core member
  • 56,612 posts

+694
Excellent

Posted 8 November 2014 - 20:57

Buildsever should first create a new image....

WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W



1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users