auanasgheps/snapraid-aio-script

Source not found and "(" unexpected

DistractedCanuck opened this issue · 6 comments

Good evening,

I would like to start by congratulating you on this script. It is incredibly feature rich.

Unfortunately, I'm trying to run it on my instance of OMV and am running into issues.

I extracted the newest release 3.2 to sbin in on my server. I then only changed the email settings in the config file. I left the " marks.

When I run the aio script it files with the following messages:

21: source not found 
32: Syntax error: "(" unexpected 

I had a look at the script and couldn't see any reason why these errors would appear. The config file is in the same directory as the aio script and is correctly named.

Any help would be greatly appreciated.

Thank you!

Can you show the full error message that you get?

Hi I wish there was more. The only thing I didn't type over is the directory. It gives me those two errors and then stops running. Or at least doesn't output anything.

I ran the script to test with sh snapraid-aio-script.sh from the directory with the script. /usr/sbin/snapraid/.

It then gives me the two outputs I posted earlier. I haven't set up mailx so I don't think the email response is being outputted either way.

I'm not at home right now but I can try again tonight and see if there's anything else happening. Maybe run it with a verbose flag?

You can create a scheduled job in OMV and it can be run from the UI too.

Have you placed the config file in the same folder? Line 21 imports the config file, and the error seems to tell that it could not find it.

Well it ran from the UI and seems to work. Now just to figure out how to get the email outputs to send.

Thanks for the help! Any idea why it doesn't run from the regular shell?

Any idea why it doesn't run from the regular shell?

I have no idea, but it's good news that it works.
I usually run it by executing just the script without sh, maybe it does the difference.

Now just to figure out how to get the email outputs to send.

Just configure your email account email in the OMV GUI, the script uses those settings.

Too easy. Thanks a ton!