Superb quality and spec AB-Com PULSe 4K SE. Crazy offer! Only £99! FREE UK DELIVERY! 4K UHD, Enigma 2, Multiboot 4 images & more!...
Superb quality and spec AB-Com PULSe 4K Rev II Twin Satellite tuner only £149! FREE UK DELIVERY! 4K UHD, Enigma 2, SATA HDD facility, Multiboot 4 images & more!...

Help needed please with cron timer

However, back to the actual scripts.


toppicks1.sh:

Code:
workdir=/usr/script/scrapes
if [ ! -d "$workdir" ]; then
   mkdir /usr/script/scrapes
fi
should really be:
Code:
workdir=/usr/script/scrapes
if [ ! -d "$workdir" ]; then
   mkdir "$workdir"
fi

toppicks2.sh:
This uses let, which is a bash-only construct, so line one should be #!/bin/sh (in base that isn't a symlink to bash, which it isn't on Vix by default).

Code:
        if [ $pick == 1 ]; then
should be
Code:
        if [ $pick -eq 1 ]; then
since you are expecting it to be a number, not text.

Code:
        if [ $pick == 1 ]; then
.
        elif [ $pick == 2 ]; then
.
        elif [ $pick == 3 ]; then
.
        else
is better done as:
Code:
case $pick in
1)
.;;
2)
.;;
3)
.;;
*)
.;;
esac



both:

Code:
cd /usr/script/scrapes
should be:
Code:
cd /usr/script/scrapes || exit
or
Code:
if ! cd /usr/script/scrapes; then
   echo >&2 "Failed to reach /usr/script/scrapes"
fi
since you shouldn't continue on an error.

thanks birdman; would you mind editing the relevant lines and re-upload the scripts as a zip so i can then put on the box and unzip them to /us/script as i did before; i think the main issue is that i am using a mac but with your help on the last script it seemed to work without me needing to open the files

i think its time for me to consider going back to windows

thanks
 
thanks birdman; would you mind editing the relevant lines and re-upload the scripts as a zip
I don't currently have time to test them, but here they are.

View attachment Unix-Archive.zip

i think its time for me to consider going back to windows

thanks
That wouldn't help. The files in the Archive.zip were Unix text files (even though they were created on a Mac). It was the transfer to the Vix box which somehow changed them into DOS text files.
I suspect you'd have the same issue on a transfer from Windows.
But you haven't yet said how you actually get the files onto the Vix box..
 
Last edited:
I don't currently have time to test them, but here they are.



i think its time for me to consider going back to windows

thanks
[/QUOTE]

no probs, there's no rush mate; did you upload the files as i can't see anything attached? thanks
 
no probs, there's no rush mate; did you upload the files as i can't see anything attached? thanks
I pressed the wrong button - and edited it straight afterwards.
 
update sorry for the late response - the source used on the script to resize the pngs, their servers were down earlier so couldn't test fully;

both scripts now work as they should

thanks a lot birdman for all your help; absolute life saver :)

I did also fire up my old windows laptop earlier and tried the default unchanged scripts which does work ; so it's the software i'm using on the mac that's the issue
 
so it's the software i'm using on the mac that's the issue
Well, it's the file-transfer process you're using that's the problem (and you're still giving no hint as to what that is).
If you sent that zip file over to the Vix box an unzipped it there the scripts would be usable.

PS:
grantdavey91 has exceeded their stored private messages quota and cannot accept further messages until they clear some space.
 
Last edited:
Well, it's the file-transfer process you're using that's the problem (and you're still giving no hint as to what that is).
If you sent that zip file over to the Vix box an unzipped it there the scripts would be usable.

PS:

i thought i did mention how i did it, i just ftp using filezilla; i unzip on the mac, then ftp from the mac to the box using filezilla; but when you say transferring as a zip and unzipping in there, i have tried this and still seems to be an issue for scripts; but the amended scripts you uploaded has worked

I'll sort out my inbox now
thanks
 

OpenViX Feeds Status

Back
Top