December 12, 201213 yr 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?
December 12, 201213 yr 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?
December 12, 201213 yr ...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.
December 12, 201213 yr 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)
December 12, 201213 yr 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.
December 12, 201213 yr 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.
December 12, 201213 yr 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
December 12, 201213 yr 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"
December 13, 201213 yr 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?
December 13, 201213 yr 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.
December 13, 201213 yr 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
December 13, 201213 yr 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.
December 14, 201213 yr 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.
December 14, 201213 yr 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 !!!
December 14, 201213 yr 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
December 15, 201213 yr 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.