Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

go file

Featured Replies

Hello

I did install a new hard drive, with a preclear

Since my server was programmed to shut down every night at 11:45pm, I've put the "#" sign just before the echo line

For the preclear, i installed screen thru package manager. And when I access the go file again to remove the # once the preclear was done, it looks like this:

 

#!/bin/bash

# Start the Management Utility

/usr/local/sbin/emhttp &

CTRLALTDEL=YES LOGSAVE=30 installpkg /boot/packages/powerdown-1.02-noarch-unRAID.tgz

/boot/unmenu/uu

echo "/sbin/powerdown" | at 23:45

cd /boot/packages && find . -name '*.auto_install' -type f -print | sort | xargs -n1 sh -c

 

Is this normal?

 

  • Author

1 more quick comment:

When I opened the go file with the Note pad application, the last line was as follow:

 

echo "/sbin/powerdown" | at 23:45cd /boot/packages && find . -name '*.auto_install' -type f -print | sort | xargs -n1 sh -c

 

Sounds weird....

And when I copied/paste to post in the forum, it appeared like that:

echo "/sbin/powerdown" | at 23:45

cd /boot/packages && find . -name '*.auto_install' -type f -print | sort | xargs -n1 sh -c

 

So I saved the go file with those 2 lines, and not as it was with only 1 line

Is it OK?

 

...When I opened the go file with the Note pad application...

If you mean Windows Notepad, you should never use that to work with Linux files. Notepad++, Textpad, I'm sure there are others. Windows uses CR/LF for end-of-line and Linux just uses LF. If you do CR/LF it will usually break something.

 

  • Author

Arghhh.....Yes, it was Windows Notepad

So what should I do if my server doesn't start properly?

 

I will have to dig in some old posts, because I think Joe.L said it was OK for the go file to use NotePad (but again I am not sure, I will have to search)

Arghhh.....Yes, it was Windows Notepad

So what should I do if my server doesn't start properly?

 

I will have to dig in some old posts, because I think Joe.L said it was OK for the go file to use NotePad (but again I am not sure, I will have to search)

It is perfectly fine to use ANY editor on the config/go file.

 

It is processed through "fromdos" prior to being executed.  It is never executed directly.

 

That is not true with many other of the Linux configuration files, as most are not processed prior to use.

 

Joe L.

1 more quick comment:

When I opened the go file with the Note pad application, the last line was as follow:

 

echo "/sbin/powerdown" | at 23:45cd /boot/packages && find . -name '*.auto_install' -type f -print | sort | xargs -n1 sh -c

 

Sounds weird....

And when I copied/paste to post in the forum, it appeared like that:

echo "/sbin/powerdown" | at 23:45

cd /boot/packages && find . -name '*.auto_install' -type f -print | sort | xargs -n1 sh -c

 

So I saved the go file with those 2 lines, and not as it was with only 1 line

Is it OK?

It should be two lines.
  • Author

OK, this is how I saved the go file before shutting down the server (2 lines)

Will see tonight if it starts properlly, and if it shuts down properlly as well at 23:45

 

Thanks

OK, this is how I saved the go file before shutting down the server (2 lines)

Will see tonight if it starts properlly, and if it shuts down properlly as well at 23:45

 

Thanks

You can type:

atq

to see the at "queue"

 

  • Author

Well, with the go file as follow, the server didn't shut down at 23:45

#!/bin/bash

# Start the Management Utility

/usr/local/sbin/emhttp &

CTRLALTDEL=YES LOGSAVE=30 installpkg /boot/packages/powerdown-1.02-noarch-unRAID.tgz

/boot/unmenu/uu

echo "/sbin/powerdown" | at 23:45

 

cd /boot/packages && find . -name '*.auto_install' -type f -print | sort | xargs -n1 sh -c

 

1 remark though: When I open it with Note Pad, I can't see the extra blank line between echo and cd /boot. This blank line only appears when I paste

 

Anyway, before having that extra line "cd /boot/etc.....my server was shutting down every time a 23:45

What should i change? Is the blank line the problem? Should I edit with another editor?

Well, with the go file as follow, the server didn't shut down at 23:45

#!/bin/bash

# Start the Management Utility

/usr/local/sbin/emhttp &

CTRLALTDEL=YES LOGSAVE=30 installpkg /boot/packages/powerdown-1.02-noarch-unRAID.tgz

/boot/unmenu/uu

echo "/sbin/powerdown" | at 23:45

 

cd /boot/packages && find . -name '*.auto_install' -type f -print | sort | xargs -n1 sh -c

 

1 remark though: When I open it with Note Pad, I can't see the extra blank line between echo and cd /boot. This blank line only appears when I paste

 

Anyway, before having that extra line "cd /boot/etc.....my server was shutting down every time a 23:45

What should i change? Is the blank line the problem? Should I edit with another editor?

Editing the file DOES NOT do anything to schedule a shutdown.  The only time that "go

file is invoked is if you reboot.

 

TO see if the shutdown command is in the "at" queue , type

atq

You can do that now, and then reboot and type it again, it should be there after a reboot.  Blank lines in the "go" file have no effect.  There is no issue with them there.

 

 

  • Author

OK, I will try tonight. But right after I added "Screen" with package manager to preclear my new disk, the go file was looking like that with Note Pad

#!/bin/bash

# Start the Management Utility

/usr/local/sbin/emhttp &

CTRLALTDEL=YES LOGSAVE=30 installpkg /boot/packages/powerdown-1.02-noarch-unRAID.tgz

/boot/unmenu/uu

echo "/sbin/powerdown" | at 23:45cd /boot/packages && find . -name '*.auto_install' -type f -print | sort | xargs -n1 sh -c

 

But when i did a copy/paste to post in the forum, it was like that

#!/bin/bash

# Start the Management Utility

/usr/local/sbin/emhttp &

CTRLALTDEL=YES LOGSAVE=30 installpkg /boot/packages/powerdown-1.02-noarch-unRAID.tgz

/boot/unmenu/uu

echo "/sbin/powerdown" | at 23:45

cd /boot/packages && find . -name '*.auto_install' -type f -print | sort | xargs -n1 sh -c

 

 

Notepad expects a CR/LF to indicate a newline. There was probably only a LF between "23:45" and "cd" so no newline as far as Notepad is concerned.

 

Even though JoeL said you could edit go with Notepad, you really should start using a Linux compatible editor because you will want to edit something else in the future on your unRAID and it will not work. You will save yourself a lot of trouble and more questions in the long run.

 

Search for Notepad++. It's free.

 

  • Author

Well, with the go file as follow, the server didn't shut down at 23:45

#!/bin/bash

# Start the Management Utility

/usr/local/sbin/emhttp &

CTRLALTDEL=YES LOGSAVE=30 installpkg /boot/packages/powerdown-1.02-noarch-unRAID.tgz

/boot/unmenu/uu

echo "/sbin/powerdown" | at 23:45

 

cd /boot/packages && find . -name '*.auto_install' -type f -print | sort | xargs -n1 sh -c

 

Where should I type the atq command?

 

1 remark though: When I open it with Note Pad, I can't see the extra blank line between echo and cd /boot. This blank line only appears when I paste

 

Anyway, before having that extra line "cd /boot/etc.....my server was shutting down every time a 23:45

What should i change? Is the blank line the problem? Should I edit with another editor?

Editing the file DOES NOT do anything to schedule a shutdown.  The only time that "go

file is invoked is if you reboot.

 

TO see if the shutdown command is in the "at" queue , type

atq

You can do that now, and then reboot and type it again, it should be there after a reboot.  Blank lines in the "go" file have no effect.  There is no issue with them there.

  • Author

When I do

cd /boot

atq

 

I receive this:

root@Tower:/boot# atq

1      Fri Dec 14 23:45:00 2012 a root

 

Why Friday Dec 14? We are Thursday Dec 13 and my server should stop tonight at 23:45, not tomorrow !!!

 

 

When I do

cd /boot

atq

 

I receive this:

root@Tower:/boot# atq

1      Fri Dec 14 23:45:00 2012 a root

 

Why Friday Dec 14? We are Thursday Dec 13 and my server should stop tonight at 23:45, not tomorrow !!!

Since we have absolutely no idea how you have the system time-zone, date and time set, we cannot answer.

 

Type

date

to see the current date/time

 

  • Author

Found it...

There was an error on my date and time

Don't know why

 

Now, it's working fine

 

Thanks

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.