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.

unMenu user Scripts - echo commands don't provide feedback on running script

Featured Replies

Added a User script to sync 2 servers together via rsync which works fine in a putty window.  It works with unMenu, but doesn't provide real time updates (via the echo commands) like a bash script does.  It seems like unmenu locks up while the script is running (which can take several hours).  At the very end of the run it give me:

 

Starting Sync to Server1 mounts to t2 and s1 set up Sat May 12 09:29:10 MDT 2012 ====== moving to Disk1 =========== Sat May 12 09:49:26 MDT 2012 ====== moving to Disk2 =========== Sat May 12 10:01:06 MDT 2012 ====== moving to Disk3 =========== Sat May 12 10:09:18 MDT 2012 ====== moving to Disk4 =========== Sat May 12 10:55:32 MDT 2012

 

Is there any way for the script to provide feedback while its running so it doesn't appear to have locked up?  I'm guessing that echo commands are not the correct way??

 

Here is the script

 

#define USER_SCRIPT_LABEL Sync to Server1
#define USER_SCRIPT_DESCR Once the server is up this should work.  Start the array first. 
#UNMENU_RELEASE $Revision: 7 $ $Date: 2010-03-29 23:12:23 -0400 (Mon, 29 Mar 2010) $
echo "Starting Sync to Server1"
cd /boot
# Backup from production server to 2nd level backup and log results
# version .11

# Set up email header
cd /boot
echo To: [email protected] >> /boot/logs/cronlogs/t1summary.log
echo From: [email protected] >> /boot/logs/cronlogs/t1summary.log
echo Subject: Tower1 rsync summary >> /boot/logs/cronlogs/t1summary.log
echo   >> /boot/logs/cronlogs/t1summary.log
echo Log of rSync backup >> /boot/logs/cronlogs/t1summary.log

# Set up mounts
cd /boot
othermounts.sh

echo ++ >> /boot/logs/cronlogs/t1summary.log
echo ++++++ starting backup now ++++++++++ >> /boot/logs/cronlogs/t1summary.log
echo ++ >> /boot/logs/cronlogs/t1summary.log
# Backup Disk 1
echo ++++++  >> /boot/logs/cronlogs/t1disk1.log
echo ++++++ starting daily cron now ++++++++++ >> /boot/logs/cronlogs/t1disk1.log
echo ++++++  >> /boot/logs/cronlogs/t1disk1.log
date
echo ====== moving to Disk1 ===========
echo ====== moving to Disk1 =========== >> /boot/logs/cronlogs/t1summary.log
date >> /boot/logs/cronlogs/t1summary.log
date >> /boot/logs/cronlogs/t1disk1.log

rsync -av --stats --progress /mnt/s1disk1/ /mnt/disk1/  >> /boot/logs/cronlogs/t1disk1.log

date >> /boot/logs/cronlogs/t1summary.log
date >> /boot/logs/cronlogs/t1disk1.log

echo == >> /boot/logs/cronlogs/t1summary.log
echo ====== ending daily cron now Disk1 =========== >> /boot/logs/cronlogs/t1summary.log
echo == >> /boot/logs/cronlogs/t1summary.log

# Backup Disk 2
echo ++++++  >> /boot/logs/cronlogs/t1disk2.log
date
echo ====== moving to Disk2 ===========
echo ====== moving to disk2 =========== >> /boot/logs/cronlogs/t1summary.log
date >> /boot/logs/cronlogs/t1summary.log
date >> /boot/logs/cronlogs/t1disk2.log

rsync -av --stats --progress /mnt/s1disk2/ /mnt/disk2/  >> /boot/logs/cronlogs/t1disk2.log

date >> /boot/logs/cronlogs/t1summary.log
date >> /boot/logs/cronlogs/t1disk2.log

echo == >> /boot/logs/cronlogs/t1summary.log
echo ====== ending daily cron now Disk2 =========== >> /boot/logs/cronlogs/t1summary.log
echo == >> /boot/logs/cronlogs/t1summary.log

# Backup Disk 3
echo ++++++  >> /boot/logs/cronlogs/t1disk3.log
date
echo ====== moving to Disk3 ===========
echo ====== moving to disk3 =========== >> /boot/logs/cronlogs/t1summary.log
date >> /boot/logs/cronlogs/t1summary.log
date >> /boot/logs/cronlogs/t1disk3.log

rsync -av --stats --progress /mnt/s1disk3/ /mnt/disk3/  >> /boot/logs/cronlogs/t1disk3.log

date >> /boot/logs/cronlogs/t1summary.log
date >> /boot/logs/cronlogs/t1disk3.log

echo == >> /boot/logs/cronlogs/t1summary.log
echo ====== ending daily cron now disk3 =========== >> /boot/logs/cronlogs/t1summary.log
echo == >> /boot/logs/cronlogs/t1summary.log

# Backup Disk 4
echo ++++++  >> /boot/logs/cronlogs/t1disk4.log
date
echo ====== moving to Disk4 ===========
echo ====== moving to disk4 =========== >> /boot/logs/cronlogs/t1summary.log
date >> /boot/logs/cronlogs/t1summary.log
date >> /boot/logs/cronlogs/t1disk4.log

rsync -av --stats --progress /mnt/s1disk4/ /mnt/disk4/  >> /boot/logs/cronlogs/t1disk4.log

date >> /boot/logs/cronlogs/t1summary.log
date >> /boot/logs/cronlogs/t1disk4.log

echo == >> /boot/logs/cronlogs/t1summary.log
echo ====== ending daily cron now disk4 =========== >> /boot/logs/cronlogs/t1summary.log
echo == >> /boot/logs/cronlogs/t1summary.log
date

# Send email of summary of results
ssmtp [email protected] < /boot/logs/cronlogs/t1summary.log
cd /boot/logs/cronlogs  
mv t1summary.log "`date +%Y%m%d_%H%M`_t1summary.logarchive"

unMenu waits for the entire stream to finish.

 

You may be able to get it to work... but doing it through unMenu is probably not the correct approach.

 

The only thing i can think of that might work is to echo the progress to the syslog (kind of like i do with my unMenu packages) and then load up the myMain or main unMenu page that refreshes every minute or so.

  • Author

unMenu waits for the entire stream to finish.  You may be able to get it to work... but doing it through unMenu is probably not the correct approach.

 

Oh Well, it was worth a try.  It notifies me by email that everything went fine.  I suppose that is good enough....

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.