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 delay

Featured Replies

Is it possible to do a go script delay until after the array mounts?

 

IE.

 

#!/bin/bash

# Start the Management Utility

/usr/local/sbin/emhttp &

 

ifconfig eth1 up

sudo ifconfig eth1 192.168.1.11

 

sleep until array mounts

python /mnt/cache/.custom/sickbeard/Sick-Beard/SickBeard.py

while ! test -d /mnt/disk1;do sleep 5;done;sleep 10

while ! test -d /mnt/disk1;do sleep 5;done;sleep 10

That code assumes the disk1 slot is populated. You will need to change disk1 to one of your in use slots if you don't have slot 1 filled.

Another consideration is that is that it's not a pause, it's a halt.

 

Here is what I use for now

while [[ ${LOOP:=10} -gt 1 && ! -b /dev/md1 ]]
do
        (( LOOP=LOOP-1 ))
        echo "Waiting for /dev/md1 to come online ($LOOP)"
        sleep 1
done
sleep 1

 

This is another version I've been working on.

#!/bin/bash

[ ${DEBUG:=0} -gt 0 ] && set -x -v

declare -a CHAR=('+' 'x');
let i=0
let maxcount=60

DIR=/mnt/disk1

while ! read -n1 -t1 -p "Waiting for ${DIR} press ANY key to stop ($maxcount): [${CHAR[${i}]}]: "
do      echo -e "\r\c"
        [[ -d ${DIR}                   ]] && break
        [[ $(( maxcount-=1 )) -lt 1    ]] && break   
        [[ $(( i+=1 )) -ge ${#CHAR[@]} ]] && let i=0;
done
echo

echo "maxcount=$maxcount REPLY=${REPLY}"

 

 

  • Author

awesome ty all for the reply's!!!  8)

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.