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 script to rsync backup server

Featured Replies

Can I do the following?

 

Normal startup of unraid, then execute a number of script files then email me the results, then powerdown?

 

The following works from a telnet session when executed one line at a time, but when put in the go script, it fails quickly claiming is it unable to find my script files.

 

#!/bin/bash
# Start the Management Utility
/usr/local/sbin/emhttp &

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

cd /boot
/boot/othermounts.sh
/boot/syncdisk4.sh
/boot/syncdisk3.sh
/boot/syncdisk2.sh
/boot/syncdisk1.sh
ssmtp [email protected] < /boot/logs/cronlogs/t1summary.log  
powerdown

 

Here is the snipped of the log file where it is attempting to run the above

 

Oct 16 14:34:50 Tower1 emhttp: shcmd (3): /usr/local/sbin/emhttp_event driver_loaded
Oct 16 14:34:50 Tower1 emhttp_event: driver_loaded
Oct 16 14:34:50 Tower1 init: Re-reading inittab
Oct 16 14:34:50 Tower1 sSMTP[1910]: Unable to locate smtp.gmail.com
Oct 16 14:34:50 Tower1 sSMTP[1910]: Cannot open smtp.gmail.com:587
Oct 16 14:34:50 Tower1 logger: Powerdown initiated
Oct 16 14:34:50 Tower1 rc.unRAID[1914]: Stopping unRAID.

Try adding a delay:

sleep 20

Is DNS set in the webGUI?

Try adding a delay:

sleep 20

Is DNS set in the webGUI?

those lines indicate you either do not have a nameserver defined, or do not have a network gateway defined.
  • Author

Try adding a delay:

sleep 20

Is DNS set in the webGUI?

those lines indicate you either do not have a nameserver defined, or do not have a network gateway defined.

 

It seems to work with a sleep 60 put in place.  I guess it was just happening too fast.

 

Now, just one more question.  Being a linux noob, I am trying to rename a log file to a system date during a bash script.

 

from rsync.log to 2011_10_14rsync.log or something similar to this.

 

Should I do it in bash, or somewhere else?  Can you suggest a good resource for scripting in bash?

 

  • Author

There is so much for examples out there that are way beyond my needs, but I might have answered my own question, thanks to this on google.  Tested it and it seems to work.

 

mv t1summary.log "`date +%Y%m%d_%H%M`_t1summary.logarchive"

 

t1summary.log

- becomes -

20111016_2141_t1summary.logarchive

 

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.