Bash command for starting array


Raptor2k

Recommended Posts

Hello community,

 

 i am a litte ashamed but i can not find the bash command for starting my array.

 

 I want to start my array using my go config file:

 

sleep 1
wget --user=xxx --password='xxx' ftp://xxx  -O /root/xxx
sleep 4
7z e /root/keyfile.7z -pxxx -O/root/
sleep 10
-> Command bash for starting array ??? <-

The command should have the same function as the button inside the GUI / Main Page -> Button " Start Array".

 

Thank for your help and mabye you can show me the manuel / webpage where i can find the bash commands for unraid.

 

Kind regadrs and thx for your help

Raptor2k

Link to comment
On 11/10/2019 at 4:48 PM, Squid said:

Admittedly I'm confused.  Why would you want to start the array via a command in the "go" file instead of simply going to Settings - Disk Settings - and enabling auto start?

i want an extra command cause my array is not auto starting. My Unraid Nas is downloading the file, unzip it but not start the array.

Auto Start is enabled.

 

So i thought... add an extra line of code in the go file.

 

Thx for your fast respone.

 

Link to comment

Here's the starting point for a command.  But, you'd also need to append the current csrf token (/var/local/emhttp/var.ini).  But even there, I have no idea if the command would work under 6.8 since you're not logged in either.

 

My best suggestion would be to place those commands for the download in the go file, prior to the emhttp line (with appropriate waits to ensure the network is running)

 

https://forums.unraid.net/topic/50490-solved-commands-to-start-and-stop-array/?tab=comments#comment-496967

 

Link to comment

Thank you Squid and bonienl.

 

The hint of boninl works flawlessly.

 

Here is my new go config file for the community:

#!/bin/bash
# Start the Management Utility
sleep 1
wget --user=xxx --password='xxx' ftp://xxx.7z  -O /root/xxx.7z
sleep 4
7z e /root/xxx.7z -pxxx -O/root/
sleep 4
/usr/local/sbin/emhttp &

Now the services start and unraid can unlock my array.

 

Just for the record. I am using version 6.7.2

 

Kind regards

Raptor2k

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.