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.

(SOLVED) Help with my Go script

Featured Replies

Hi Guys,

 

I have been trying to activate both Maraschino and Heaphones to start from my "go" script without any luck. I also NEVER been able to get the unMenu packages for the applications to work. Below is my go script. The are the ones that do not start...

 

  python /mnt/cache/.custom/headphones/Headphones.py -d -p 8091
  nohup python /mnt/cache/.custom/maraschino/Maraschino.py &

 

 

Here is my full go script:

 


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


#Hernando added below

sleep 30
for i in /dev/md*
do
    blockdev --setra 2048 $i
done

echo nameserver 192.168.0.1 >/etc/resolv.conf
echo 192.168.0.201 tower >>/etc/hosts/boot/unmenu/uu

cd /boot/packages && find . -name '*.auto_install' -type f -print | sort | xargs -n1 sh -c 
python /mnt/cache/.custom/headphones/Headphones.py -d -p 8091
# determine if cache drive online, retry upto 7 times
for i in 0 1 2 3 4 5 6 7
do
    if [ ! -d /mnt/cache ]
    then
      sleep 10
    fi
done

# If Cache drive is online, start SABNzbd
if [ -d /mnt/cache ]; then
   Start SABnzbd and sickbeard
  installpkg /boot/custom/SABnzbdDependencies-1.3-i486-unRAID.tgz
  python /mnt/cache/.custom/sabnzbd/SABnzbd.py -d -s 192.168.0.201:88
  nohup python /mnt/cache/.custom/maraschino/Maraschino.py &
  nohup python /mnt/cache/.custom/sickbeard/SickBeard.py &
  python /mnt/cache/.custom/headphones/Headphones.py -d -p 8091

beep -f660 -l100ms -D 130ms
beep -f660 -l100ms -D 170ms
beep -f660 -l100ms -D 150ms
beep -f510 -l100ms -D 80ms
beep -f660 -l100ms -D 150ms
beep -f770 -l100ms -D 275ms
beep -f380 -l100ms -D 575ms
beep -f660 -l100ms -D 130ms
beep -f660 -l100ms -D 170ms
beep -f660 -l100ms -D 150ms
beep -f510 -l100ms -D 80ms
beep -f660 -l100ms -D 150ms
beep -f770 -l100ms -D 275ms
beep -f380 -l100ms -D 575ms
fi

/boot/unmenu/uu

cp --remove-destination /boot/custom/par2 /usr/bin
cp /boot/custom/libtbb.so /usr/bin
cp /boot/custom/libtbb.so.2 /usr/bin

sleep 2
beep -f 700 ; beep -f 500 ; beep -f 700 ; beep -f 500
beep -f 700 ; beep -f 500 ; beep -f 700 ; beep -f 500

 

Whenever I type each of the lines individually at the command line, they execute and start the application properly. I want to be able to get these to start automatically. Can anyone offer some advice please?

 

Many thanks,

 

Hernando

 

ps I am using unRAID 4.7

To start with.  This

echo 192.168.0.201 tower >>/etc/hosts/boot/unmenu/uu

 

should be on two lines

echo 192.168.0.201 tower >>/etc/hosts

/boot/unmenu/uu

 

the line like this further in the go script can be removed, as it will just try to start unmenu a second time.

 

This is not needed at all unless you are on pre 4.0 versions of unRAID

for i in /dev/md*

do

    blockdev --setra 2048 $i

done

 

I have no idea what these do, but shared libraries typically go in /lib or /usr/lib, not in /bin

cp /boot/custom/libtbb.so /usr/bin

cp /boot/custom/libtbb.so.2 /usr/bin

 

I did not see you install python before invoking this line:

python /mnt/cache/.custom/headphones/Headphones.py -d -p 8091

and

When unRAID starts, it may not have any idea where you installed python, so you might need a full path here

/full/path/to/python /mnt/cache/.custom/headphones/Headphones.py -d -p 8091

  nohup /full/path/to/python /mnt/cache/.custom/maraschino/Maraschino.py &

 

 

  • Author

Hi Joe,

 

Thank you for the corrections to my go script. I have made the fixes you recommended.

 

Unfortunately, as far as the python startup for Headphones and Maraschino, they did not work. the line reads:

 

/usr/bin/python /mnt/cache/.custom/headphones/Heaphones.py -d -p 8091 

 

It did not start the service.... I go to my browser and go to tower:8091 or 192.168.0.201:8081 and I get the "url not found" message. If I type the same thing in a Putty terminal screen, it works.

 

At the moment I am only testing it with Heaphones... Is there anything else you can recommend?

 

Can I create some script that auto starts everytime unRAID boots? This would be independent of the go script.

 

Many thanks again,

 

H.

  • Author

Anybody.... ???

 

Ohhh Boy! I am so embarrassed. For some reason, ages ago, I copied my go script to /boot/custom... this is the one I have been editing all along... needless to say I now know that it is the one in /boot/config

 

:-[ :-[ :-[ :-[ :-[ :-[

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.