An Improved unRAID web-interface, extensible, and easy to install


Recommended Posts

This is very cool.  My only difficulty with it is having to dig down into the file structure to unmount iso's prior to stopping the array.

 

I tried to add a link to unmount iso's from the front page listing of mounted iso's by changing line 520 to:

 

out_str = out_str loop_iso[a] "<a href=\"http://" MyHost ":" MyPort "/share_iso?dir=" loop_iso[a] "&unshare_iso=" loop_iso[a] "\"> UnShare ISO</a><br>"

 

It only kinda works.  When you click the link it throws the following error: "Sorry: Access to invalid-directory/ is not permitted."

However, it does appear to unmount the iso.

You can replace the existing function with this one.  It will give you links at the top to un-share each without having to traverse the file tree.

function PrintLoopMounted ( out_str) {
        out_str=""
        for (a in loop_iso ) {
                if (loop_iso[a] ~ ".ISO" || loop_iso[a] ~ ".iso" ) {
                    bn=getBaseName( loop_iso[a])
                    bn_len=length(bn)
                    dir_name=substr(loop_iso[a], 1, length(loop_iso[a]) - bn_len)
                    out_str = out_str loop_iso[a] " <a href=\"http://" MyHost ":" MyPort "/share_iso?dir=" dir_name "&unshare_iso=" loop_iso[a] "\">UnShare ISO</a><br>"
                    #out_str = out_str loop_iso[a] "<br>"
                }
        }
        if ( out_str == "" ) out_str = "No ISO files shared currently."
        return out_str
}

I admit... I don't know AWK syntax at all.

It is OK, it is a lot like "C", Javascript, Java... and a host of other languages.  All you need to figure out is where to put the semi-colons.  (hint: they are optional at the ends of lines)

It would be nice if the Array Management plugin could close all loop devices when the 'Stop Array' button were pressed.

I agree.  I'm also embarrassed to find the "Stop" button on the unMENU Array Management page is currently broken.  It will not find a needed function.

I'll fix that and try to figure out a way to un-mount the looped ISO images if you press stop.

In my testing I accidently mounted "backup.iso.uibak".  It mounted it as "backup.iso" but since that file doesn't really exist (notice the file extension) I am unable to unmount it!!

I see a few bugs too.  The "Share" link is present on directories with "iso" somewhere in their name, and on files with it "somewhere" in their name too.

I need to limit it to files only, and only if the last 4 characters of the name are ".iso"

 

Hey... not too bad for a first alpha...

 

I see an additional issue in that the losetup command does not give the full path I need when the path to the ISO file-name is long.

 

I probably need to use "mount" instead

 

losetup output:

root@Tower:~# losetup -a

/dev/loop0: [0902]:6336 (/mnt/disk2/Movies K-O/LETHAL_WEAPON-2.ISO)

/dev/loop1: [0902]:6335 (/mnt/disk2/Movies K-O/LETHAL_WEAPON-4.ISO)

/dev/loop2: [000d]:268 (/mnt/user/data/slackware-12.0-iso/slackware-12.0-install-dvd.i*)

 

mount output:

root@Tower:~# mount

fusectl on /sys/fs/fuse/connections type fusectl (rw)

usbfs on /proc/bus/usb type usbfs (rw)

/dev/sdc1 on /boot type vfat (rw,noatime,nodiratime,umask=0,shortname=mixed)

/dev/md11 on /mnt/disk11 type reiserfs (rw,noatime,nodiratime,noacl,nouser_xattr)

/dev/md6 on /mnt/disk6 type reiserfs (rw,noatime,nodiratime,noacl,nouser_xattr)

/dev/md8 on /mnt/disk8 type reiserfs (rw,noatime,nodiratime,noacl,nouser_xattr)

/dev/md4 on /mnt/disk4 type reiserfs (rw,noatime,nodiratime,noacl,nouser_xattr)

/dev/md1 on /mnt/disk1 type reiserfs (rw,noatime,nodiratime,noacl,nouser_xattr)

/dev/md5 on /mnt/disk5 type reiserfs (rw,noatime,nodiratime,noacl,nouser_xattr)

/dev/md2 on /mnt/disk2 type reiserfs (rw,noatime,nodiratime,noacl,nouser_xattr)

/dev/md7 on /mnt/disk7 type reiserfs (rw,noatime,nodiratime,noacl,nouser_xattr)

/dev/md3 on /mnt/disk3 type reiserfs (rw,noatime,nodiratime,noacl,nouser_xattr)

/dev/md10 on /mnt/disk10 type reiserfs (rw,noatime,nodiratime,noacl,nouser_xattr)

shfs on /mnt/user type fuse.shfs (rw,nosuid,nodev,allow_other)

/mnt/disk2/Movies K-O/LETHAL_WEAPON-2.ISO on /var/tmp/mnt/LETHAL_WEAPON-2 type iso9660 (ro,loop=/dev/loop0)

/mnt/disk2/Movies K-O/LETHAL_WEAPON-4.ISO on /var/tmp/mnt/LETHAL_WEAPON-4 type iso9660 (ro,loop=/dev/loop1)

/mnt/user/data/slackware-12.0-iso/slackware-12.0-install-dvd.iso on /var/tmp/mnt/slackware-12.0-install-dvd type iso9660 (ro,loop=/dev/loop2)

 

The "mount" output has the full path names I need. 

 

Joe L.

Link to comment
  • Replies 552
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

TEST RESULTS: I don't think the 'stop array' button closes loop devices.  When I tried to stop the array while an ISO was mounted the screen went blank with "e 0 " in the top left corner.  Then when I went back into unmenu the ISO was still mounted. 

Yes, I learned it is broken... I don't know how I missed it when I was copying code from unmenu.awk to make the new admin plug-in, but somehow, I missed it.  I guess the test team never found the bug... a function is missing.

 

You can add this function to the end of 08-unmenu_array_mgmt.awk to stop it from erroring with the results you saw and at least attempt to stop the array.

It will still not be able to stop the array when a loop device is active, but I'll post a fixed version that will once I figure it out.  For now, unShare the looped ISO image mounts.

 

Add this function to the end of 08-unmenu_array_mgmt.awk:

function StopArray() {

    # stop the unRAID array

    cmd="/root/mdcmd stop"

    while (( cmd | getline f ) > 0) ;

    close(cmd);

}

 

Joe L.

Link to comment

This is very cool.  My only difficulty with it is having to dig down into the file structure to unmount iso's prior to stopping the array.

New 1.1 version of "Share ISO" plug-in attached here.  Can now UnShare from top of form list of currently shared ISO Images.

It would be nice if the Array Management plugin could close all loop devices when the 'Stop Array' button were pressed.

Working on Array Management plug-in changes to do this... not done yet.

In my testing I accidently mounted "backup.iso.uibak".  It mounted it as "backup.iso" but since that file doesn't really exist (notice the file extension) I am unable to unmount it!!

This bug is fixed. Can't mount unless file name ends in ".iso"

 

Have fun. 

 

I did confirm, if you attempt to stop the array with the unRAID management console, any disks with mounted ISO images will be unable to be un-mounted, and those that can be un-mounted will show up as un-formatted.  If this occurs, just UnShare the ISO images and press "Stop" once more.  It will then work.

 

Just don't press "Format" when those false indications of un-formatted disks show themselves, or unRAID will reformat the disks, and you will hate yourself in the morning because you asked it to erase your data. :( :( :(

 

Joe L.

Link to comment

This looks great.  Does this mean you can access it via a windoze pc via network places?? I guess this would mean the iso can be seen on the network regardless of what device is looking??

 

Hey JoeL - any chance you could make it so the iso can be switched from "Read Only" to "Read/Write" (hopefully with a check box or password option so it can't be written to default). I tweak a lot of IFO files and this functionality would mean I could write the IFO's directly back to the iso without all the to-and-froing of iso-to-vob-to tweaked vob-back to iso etc.

Link to comment
  • 2 weeks later...

Joe,

 

Can you tell me what this error is?

 

root@Tower:~# cd /boot/unmenu

root@Tower:/boot/unmenu# uu

root@Tower:/boot/unmenu# unmenu[21659]: awk: ./unmenu.awk:256: fatal: can't open

two way socket `/inet/tcp/8080/0/0' for input/output (No such file or directory

)

It indicates the port (8080) is already in use.  Therefore, you probably already have unMENU running when you attempted to run it again at the command line.  (or you are running some other process that has port 8080 open).  Only one process can open a port for reading at a time.

 

Joe L.

Link to comment

I'm using 1.2 right now, but this issue was present in 1.1 as well.

 

I have MyHost set to an IP address instead of Tower in unmenu_local.conf. For nearly all modules it operates normally. However the link to unRAID Main has problems.

 

It appears to build the frame from unMENU correctly, however the inner frame seems to try to connect to tower/main.htm, producing a DNS error (since I'm on a Mac and //tower isn't a valid browser address). My completely uneducated guess is that something in the module is hardcoded to tower/main.htm instead of the variable MyHost/main.htm

Link to comment

I'm using 1.2 right now, but this issue was present in 1.1 as well.

 

I have MyHost set to an IP address instead of Tower in unmenu_local.conf. For nearly all modules it operates normally. However the link to unRAID Main has problems.

 

It appears to build the frame from unMENU correctly, however the inner frame seems to try to connect to tower/main.htm, producing a DNS error (since I'm on a Mac and //tower isn't a valid browser address). My completely uneducated guess is that something in the module is hardcoded to tower/main.htm instead of the variable MyHost/main.htm

 

Take a look here to figure out the //tower issue on your Mac

Link to comment

prostuff, I've read those links previously. This isn't exactly that issue. I'd prefer to not to edit my hosts file, as it's a pain to maintain on multiple machines, and many of the machines that end up on my network and need access to unRAID aren't my own machines I can manage.

 

Other than this one feature in unMENU, everything else works fine with a straight IP address. Even other modules in unMENU read the value of MyHost just fine and appropriately connect to my tower.

Link to comment

I'm using 1.2 right now, but this issue was present in 1.1 as well.

 

I have MyHost set to an IP address instead of Tower in unmenu_local.conf. For nearly all modules it operates normally. However the link to unRAID Main has problems.

 

It appears to build the frame from unMENU correctly, however the inner frame seems to try to connect to tower/main.htm, producing a DNS error (since I'm on a Mac and //tower isn't a valid browser address). My completely uneducated guess is that something in the module is hardcoded to tower/main.htm instead of the variable MyHost/main.htm

Looking in the code, in file "999-unmenu-unraid_main.awk",  it seems there is a special config value that you can set

 

The specific plug-in page for "unRAID Main" uses a variable named "unRAIDHost" for the host name, and if it is not set, it uses the host name of the unRAID server.

 

The line of code is

MyHost = CONFIG["unRAIDHost"] ? CONFIG["unRAIDHost"] : getHost()

It evaluates the first value after the "=" and if it exists, it uses it, otherwise it evaluates the value after the ":" and assigns it as MyHost.

You probably do not have a unRAIDHost variable defined.

Therefore it uses the output of the getHost function to assign the MyHost variable (and assigns it the name of your server... "tower")

 

Then, the inline frame is just loaded with

<iframe width=100% height=\"1200\" src=\"http://" MyHost "/main.htm\">

which is the normal unRAID management page.

 

I think you can simply set a variable in your unmenu_local.conf file like this:

 

unRAIDHost = 192.168.1.100

 

(substituting your IP address, of course, and making sure you capitalize the unRAIDHost variable name as shown here)

 

Once in place, your unRAID Main page should work.  The other alternative solution would be to edit your "hosts" file on the MAC to have a line like this:

tower 192.168.1.100

 

Then it would know the IP address of your server, and you could reference it by name. (again, use the IP address of your server, not the one I used in my example)

 

Joe L.

Link to comment

Joe, setting that variable in unmenu_local.conf worked perfectly. Thanks!

I remember I had to make that a separate setting for some reason...  Probably for those who were running unRAID itself on a non-standard port.

 

Glad it was that easy to fix.  Depending on the browser you use, the "refresh" button on the unRAID page may not work.  Lime-technology uses javascript on that button that does not work in an inline frame under Firefox.  Just use the browser's refresh instead. It is a Firefox bug, not an unMENU bug.

 

Joe L.

Link to comment

Maybe I just picked a bad day to try this but when I click on any of the download links in package manager from my browser I get an otherwise blank screen with

 

'e 0'

 

and am seeing the below messages on the main unMENU screen and in the syslog.

 

I also noticed that when I click on any of the buttons in 'User Scripts' nothing seems to happen for what that's worth.

 

I'm using the v1.2 version of unMENU and am running v4.4.2 of unRAID pro

 

thanks for any help/comments

 

--Don

 

==

 

Oct 18 18:15:49 raid_01 unmenu[6918]: gawk: ./990-unmenu-wget.awk:595: fatal: can't open two way socket `/inet/tcp/0/linuxpackages.cs.utah.edu/80' for input/output (No such file or directory)
Oct 18 18:20:46 raid_01 unmenu[6918]: gawk: ./990-unmenu-wget.awk:595: fatal: can't open two way socket `/inet/tcp/0/linuxpackages.cs.utah.edu/80' for input/output (No such file or directory)
Oct 18 18:23:12 raid_01 unmenu[6918]: gawk: ./08-unmenu-array_mgmt.awk:115: warning: escape sequence `\'' treated as plain `''
Oct 18 18:24:17 raid_01 unmenu[6918]: gawk: ./990-unmenu-wget.awk:595: fatal: can't open two way socket `/inet/tcp/0/repository.slacky.eu/80' for input/output (No such file or directory)
Oct 18 18:24:22 raid_01 unmenu[6918]: gawk: ./990-unmenu-wget.awk:595: fatal: can't open two way socket `/inet/tcp/0/slackware.cs.utah.edu/80' for input/output (No such file or directory)
...

Oct 18 17:01:27 raid_01 unmenu[2364]: gawk: ./990-unmenu-wget.awk:595: fatal: can't open two way socket `/inet/tcp/0/unraid-powercontrol.googlecode.com/80' for input/output (No such file or directory)
Oct 18 17:02:00 raid_01 unmenu[2364]: gawk: ./990-unmenu-wget.awk:595: fatal: can't open two way socket `/inet/tcp/0/linuxpackages.cs.utah.edu/80' for input/output (No such file or directory)
Oct 18 17:02:59 raid_01 unmenu[2364]: gawk: ./08-unmenu-array_mgmt.awk:115: warning: escape sequence `\'' treated as plain `''
Oct 18 17:05:15 raid_01 unmenu[2364]: gawk: ./990-unmenu-wget.awk:595: fatal: can't open two way socket `/inet/tcp/0/unraid-powercontrol.googlecode.com/80' for input/output (No such file or directory)
Oct 18 17:07:04 raid_01 unmenu[2364]: gawk: ./990-unmenu-wget.awk:595: fatal: can't open two way socket `/inet/tcp/0/unraid-powercontrol.googlecode.com/80' for input/output (No such file or directory)
Oct 18 17:07:16 raid_01 unmenu[2364]: gawk: ./990-unmenu-wget.awk:595: fatal: can't open two way socket `/inet/tcp/0/linuxpackages.cs.utah.edu/80' for input/output (No such file or directory)
Oct 18 17:20:40 raid_01 unmenu[2364]: gawk: ./990-unmenu-wget.awk:595: fatal: can't open two way socket `/inet/tcp/0/linuxpackages.cs.utah.edu/80' for input/output (No such file or directory)
Oct 18 17:21:13 raid_01 unmenu[2364]: gawk: ./990-unmenu-wget.awk:595: fatal: can't open two way socket `/inet/tcp/0/repository.slacky.eu/80' for input/output (No such file or directory)
Oct 18 17:22:14 raid_01 unmenu[2364]: /boot/unmenu/uu: line 33: 2365 User defined signal 1 awk -W re-interval -f ./unmenu.awk 2>&1 1Oct 18 17:22:14 raid_01 unmenu[2364]: exit status 138
Oct 18 17:23:18 raid_01 unmenu[2364]: gawk: ./990-unmenu-wget.awk:595: fatal: can't open two way socket `/inet/tcp/0/linuxpackages.cs.utah.edu/80' for input/output (No such file or directory)
Oct 18 17:26:28 raid_01 unmenu[2364]: /boot/unmenu/uu: line 33: 5352 Terminated awk -W re-interval -f ./unmenu.awk 2>&1 1Oct 18 17:27:36 raid_01 unmenu[6236]: gawk: ./990-unmenu-wget.awk:595: fatal: can't open two way socket `/inet/tcp/0/unraid-powercontrol.googlecode.com/80' for input/output (No such file or directory)
Oct 18 17:28:18 raid_01 unmenu[6236]: ./uu: line 33: 6237 Terminated awk -W re-interval -f ./unmenu.awk 2>&1 1Oct 18 17:32:02 raid_01 in.telnetd[6902]: connect from 192.168.2.108 (192.168.2.108)
Oct 18 17:32:05 raid_01 login[6903]: ROOT LOGIN on `pts/0' from `192.168.2.108'
Oct 18 17:33:02 raid_01 unmenu[6918]: ls: cannot access /boot/custom/etc/rc.d/*: No such file or directory
Oct 18 17:33:34 raid_01 unmenu[6918]: gawk: ./990-unmenu-wget.awk:595: fatal: can't open two way socket `/inet/tcp/0/linuxpackages.cs.utah.edu/80' for input/output (No such file or directory)
Oct 18 17:40:53 raid_01 emhttp: shcmd (64): /usr/sbin/hdparm -y /dev/hdf >/dev/null
Oct 18 17:40:53 raid_01 emhttp: shcmd (65): /usr/sbin/hdparm -y /dev/sde >/dev/null
Oct 18 17:57:53 raid_01 emhttp: shcmd (66): /usr/sbin/hdparm -y /dev/hdh >/dev/null
Oct 18 18:02:53 raid_01 emhttp: shcmd (67): /usr/sbin/hdparm -y /dev/sda >/dev/null
Oct 18 18:14:18 raid_01 in.telnetd[7981]: connect from 192.168.2.108 (192.168.2.108)
Oct 18 18:14:21 raid_01 login[7982]: ROOT LOGIN on `pts/1' from `192.168.2.108'
Oct 18 18:15:49 raid_01 unmenu[6918]: gawk: ./990-unmenu-wget.awk:595: fatal: can't open two way socket `/inet/tcp/0/linuxpackages.cs.utah.edu/80' for input/output (No such file or directory)

Link to comment

Maybe I just picked a bad day to try this but when I click on any of the download links in package manager from my browser I get an otherwise blank screen with

 

'e 0'

 

and am seeing the below messages on the main unMENU screen and in the syslog.

 

I'm using the v1.2 version of unMENU and am running v4.4.2 of unRAID pro

 

thanks for any help/comments

 

--Don

 

==

 

Oct 18 18:15:49 raid_01 unmenu[6918]: gawk: ./990-unmenu-wget.awk:595: fatal: can't open two way socket `/inet/tcp/0/linuxpackages.cs.utah.edu/80' for input/output (No such file or directory)
Oct 18 18:20:46 raid_01 unmenu[6918]: gawk: ./990-unmenu-wget.awk:595: fatal: can't open two way socket `/inet/tcp/0/linuxpackages.cs.utah.edu/80' for input/output (No such file or directory)
Oct 18 18:23:12 raid_01 unmenu[6918]: gawk: ./08-unmenu-array_mgmt.awk:115: warning: escape sequence `\'' treated as plain `''
Oct 18 18:24:17 raid_01 unmenu[6918]: gawk: ./990-unmenu-wget.awk:595: fatal: can't open two way socket `/inet/tcp/0/repository.slacky.eu/80' for input/output (No such file or directory)
Oct 18 18:24:22 raid_01 unmenu[6918]: gawk: ./990-unmenu-wget.awk:595: fatal: can't open two way socket `/inet/tcp/0/slackware.cs.utah.edu/80' for input/output (No such file or directory)
...

Oct 18 17:01:27 raid_01 unmenu[2364]: gawk: ./990-unmenu-wget.awk:595: fatal: can't open two way socket `/inet/tcp/0/unraid-powercontrol.googlecode.com/80' for input/output (No such file or directory)
Oct 18 17:02:00 raid_01 unmenu[2364]: gawk: ./990-unmenu-wget.awk:595: fatal: can't open two way socket `/inet/tcp/0/linuxpackages.cs.utah.edu/80' for input/output (No such file or directory)
Oct 18 17:02:59 raid_01 unmenu[2364]: gawk: ./08-unmenu-array_mgmt.awk:115: warning: escape sequence `\'' treated as plain `''
Oct 18 17:05:15 raid_01 unmenu[2364]: gawk: ./990-unmenu-wget.awk:595: fatal: can't open two way socket `/inet/tcp/0/unraid-powercontrol.googlecode.com/80' for input/output (No such file or directory)
Oct 18 17:07:04 raid_01 unmenu[2364]: gawk: ./990-unmenu-wget.awk:595: fatal: can't open two way socket `/inet/tcp/0/unraid-powercontrol.googlecode.com/80' for input/output (No such file or directory)
Oct 18 17:07:16 raid_01 unmenu[2364]: gawk: ./990-unmenu-wget.awk:595: fatal: can't open two way socket `/inet/tcp/0/linuxpackages.cs.utah.edu/80' for input/output (No such file or directory)
Oct 18 17:20:40 raid_01 unmenu[2364]: gawk: ./990-unmenu-wget.awk:595: fatal: can't open two way socket `/inet/tcp/0/linuxpackages.cs.utah.edu/80' for input/output (No such file or directory)
Oct 18 17:21:13 raid_01 unmenu[2364]: gawk: ./990-unmenu-wget.awk:595: fatal: can't open two way socket `/inet/tcp/0/repository.slacky.eu/80' for input/output (No such file or directory)
Oct 18 17:22:14 raid_01 unmenu[2364]: /boot/unmenu/uu: line 33: 2365 User defined signal 1 awk -W re-interval -f ./unmenu.awk 2>&1 1Oct 18 17:22:14 raid_01 unmenu[2364]: exit status 138
Oct 18 17:23:18 raid_01 unmenu[2364]: gawk: ./990-unmenu-wget.awk:595: fatal: can't open two way socket `/inet/tcp/0/linuxpackages.cs.utah.edu/80' for input/output (No such file or directory)
Oct 18 17:26:28 raid_01 unmenu[2364]: /boot/unmenu/uu: line 33: 5352 Terminated awk -W re-interval -f ./unmenu.awk 2>&1 1Oct 18 17:27:36 raid_01 unmenu[6236]: gawk: ./990-unmenu-wget.awk:595: fatal: can't open two way socket `/inet/tcp/0/unraid-powercontrol.googlecode.com/80' for input/output (No such file or directory)
Oct 18 17:28:18 raid_01 unmenu[6236]: ./uu: line 33: 6237 Terminated awk -W re-interval -f ./unmenu.awk 2>&1 1Oct 18 17:32:02 raid_01 in.telnetd[6902]: connect from 192.168.2.108 (192.168.2.108)
Oct 18 17:32:05 raid_01 login[6903]: ROOT LOGIN on `pts/0' from `192.168.2.108'
Oct 18 17:33:02 raid_01 unmenu[6918]: ls: cannot access /boot/custom/etc/rc.d/*: No such file or directory
Oct 18 17:33:34 raid_01 unmenu[6918]: gawk: ./990-unmenu-wget.awk:595: fatal: can't open two way socket `/inet/tcp/0/linuxpackages.cs.utah.edu/80' for input/output (No such file or directory)
Oct 18 17:40:53 raid_01 emhttp: shcmd (64): /usr/sbin/hdparm -y /dev/hdf >/dev/null
Oct 18 17:40:53 raid_01 emhttp: shcmd (65): /usr/sbin/hdparm -y /dev/sde >/dev/null
Oct 18 17:57:53 raid_01 emhttp: shcmd (66): /usr/sbin/hdparm -y /dev/hdh >/dev/null
Oct 18 18:02:53 raid_01 emhttp: shcmd (67): /usr/sbin/hdparm -y /dev/sda >/dev/null
Oct 18 18:14:18 raid_01 in.telnetd[7981]: connect from 192.168.2.108 (192.168.2.108)
Oct 18 18:14:21 raid_01 login[7982]: ROOT LOGIN on `pts/1' from `192.168.2.108'
Oct 18 18:15:49 raid_01 unmenu[6918]: gawk: ./990-unmenu-wget.awk:595: fatal: can't open two way socket `/inet/tcp/0/linuxpackages.cs.utah.edu/80' for input/output (No such file or directory)

See here: http://lime-technology.com/forum/index.php?topic=2595.msg34399#msg34399

 

Joe L.

Link to comment

I successfully downloaded and installed the apcupsd and powerdown packages.

 

I confirmed the ups status returned running info

 

I clicked on the 'Enable Re-Install on Re-Boot' button for each of these in the package manager page

 

my /boot/config/go script looks like the below

 

#!/bin/bash

# Start the Management Utility

/usr/local/sbin/emhttp &

/boot/unmenu/uu

installpkg /boot/packages/cxxlibs-6.0.8-i486-4.tgz

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

 

Note that I already had a /boot/packages dir and already had the entry to install cxxlibs-6.0.8-i486-4.tgz manually on boot

 

I can see the below exist

 

/boot/packages/apcupsd-3.14.3-i486-1kjz.tgz.auto_install*

/boot/packages/powerdown-1.02-noarch-unRAID.tgz.auto_install*

 

Is the /boot/unmenu/uucd file supposed to exist?

 

The apcupsd package isn't getting restarted on boot

 

I get the below from a telnet session

 

root@raid_01:~# /boot/unmenu/uucd

-bash: /boot/unmenu/uucd: No such file or directory

 

I can re-install the packages and re-enable the restart but get the same behavior on reboot (packages don't appear to be getting restarted, manual command

from telnet session fails

 

ups status shows:

(from /sbin/apcaccess status)The command '/sbin/apcaccess ' was not found on your system.  You may need to install it.You don't appear to have a UPS monitoring program installed

 

post reboot package manager believes these aren't installed

 

Package downloaded, but not yet installed

Link to comment

I successfully downloaded and installed the apcupsd and powerdown packages.

 

I confirmed the ups status returned running info

 

I clicked on the 'Enable Re-Install on Re-Boot' button for each of these in the package manager page

 

my /boot/config/go script looks like the below

 

#!/bin/bash

# Start the Management Utility

/usr/local/sbin/emhttp &

/boot/unmenu/uu

installpkg /boot/packages/cxxlibs-6.0.8-i486-4.tgz

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

 

Note that I already had a /boot/packages dir and already had the entry to install cxxlibs-6.0.8-i486-4.tgz manually on boot

 

I can see the below exist

 

/boot/packages/apcupsd-3.14.3-i486-1kjz.tgz.auto_install*

/boot/packages/powerdown-1.02-noarch-unRAID.tgz.auto_install*

 

Is the /boot/unmenu/uucd file supposed to exist?

 

The apcupsd package isn't getting restarted on boot

 

I get the below from a telnet session

 

root@raid_01:~# /boot/unmenu/uucd

-bash: /boot/unmenu/uucd: No such file or directory

 

I can re-install the packages and re-enable the restart but get the same behavior on reboot (packages don't appear to be getting restarted, manual command

from telnet session fails

 

ups status shows:

(from /sbin/apcaccess status)The command '/sbin/apcaccess ' was not found on your system.  You may need to install it.You don't appear to have a UPS monitoring program installed

 

post reboot package manager believes these aren't installed

 

Package downloaded, but not yet installed

The problem is that when you added a line for "uu" you did not put a newline after it.  When the next line was added, it appended the same line with its "cd" command.

 

Edit the config file to properly put the /boot/unmenu/uu command on one line, and the next line should be

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

and it should be followed by a newline so your cursor in the editor ends on a blank line on its own.

 

Joe L.

Link to comment

Your file is currently this:

#!/bin/bash

# Start the Management Utility

/usr/local/sbin/emhttp &

/boot/unmenu/uu                                                 <--- delete this line

installpkg /boot/packages/cxxlibs-6.0.8-i486-4.tgz

/boot/unmenu/uucd /boot/packages && find . -name '*.auto_install' -type f -print | sort | xargs -n1 sh -c   <-- split this into two lines

 

It should be this:

#!/bin/bash

# Start the Management Utility

/usr/local/sbin/emhttp &

installpkg /boot/packages/cxxlibs-6.0.8-i486-4.tgz

/boot/unmenu/uu

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

 

 

You currently have /boot/unmenu/uu twice in your "go" script. Only one is needed, the second will fail as it is already being invoked, to fix this, delete the first.

 

Once you fix the file, you can reboot and apcupsd should start up as expected.

 

 

 

Link to comment

Thanks again!

 

I had manually added the line to start unMENU at the end of the go script and thought it had been stepped on/gotten deleted by the addition of the packages so I added it back in above again those lines.  Now I see what happened.

 

It looks like the lines added by unMENU weren't preceded by a <cr><lf> for some reason?

 

Maybe I needed to have a blank line at the end of the go file?

 

I've seen that kind of thing before.

Link to comment

Most of the time I have no idea what I'm doing when it comes to the command line but I've stumbled my way around to get things up and running. I setup unMenu and its working and I want to setup a custom user script. I had SABnzbd start from the go file but it stopped working magically one day, no idea why, but if I go to the command line and run everything SABnzbd starts fine. (after reading through a few posts on here I think it might be a timing issue) anyways this is my custom script: (It works, but no idea if it should be like this or not)

 

#define USER_SCRIPT_LABEL SABnzbd

#define USER_SCRIPT_DESCR Install dependencies and start SABnzbd

cd /boot/

installpkg SABnzbdDependencies-1.2-i486-unRAID.tgz

cd /boot/custom/usr/share/packages/sabnzbd/

python SABnzbd.py -d -f /boot/custom/usr/share/packages/sabnzbd/SABnzbd.ini -s 172.16.1.100:8081

 

Thanks.

Link to comment

Most of the time I have no idea what I'm doing when it comes to the command line but I've stumbled my way around to get things up and running. I setup unMenu and its working and I want to setup a custom user script. I had SABnzbd start from the go file but it stopped working magically one day, no idea why, but if I go to the command line and run everything SABnzbd starts fine. (after reading through a few posts on here I think it might be a timing issue) anyways this is my custom script: (It works, but no idea if it should be like this or not)

 

#define USER_SCRIPT_LABEL SABnzbd

#define USER_SCRIPT_DESCR Install dependencies and start SABnzbd

cd /boot/

installpkg SABnzbdDependencies-1.2-i486-unRAID.tgz

cd /boot/custom/usr/share/packages/sabnzbd/

python SABnzbd.py -d -f /boot/custom/usr/share/packages/sabnzbd/SABnzbd.ini -s 172.16.1.100:8081

 

Thanks.

That will work if the file SABnzbdDependencies-1.2-i486-unRAID.tgz is located in the /boot folder.

 

Most of us have created a /boot/packages filder for all the add-on packages. If the file were in that folder, then you would either "cd" to /boot/packages (instead of /boot), or you could invoke the installpkg command like this:

installpkg /boot/packages/SABnzbdDependencies-1.2-i486-unRAID.tgz

giving it the full path to the .tgz file.

 

I'm glad you found the user-script feature easy to use.  That is exactly why I created it.

 

Joe L.

Link to comment

 

installpkg /boot/packages/SABnzbdDependencies-1.2-i486-unRAID.tgz

 

Well thats the part were I thought I was doing something wrong with the user scripts. When I would have the line as installpkg /boot/SABnzbdDependencies-1.2-i486-unRAID.tgz it would return an error saying that the file doesn't end in .tgz the same with trying the python command because the path wasn't found. So thats why I was going into the directory first then running each command.

Link to comment

Suddenly getting an error when trying to access myMain.

 

Same thing happens whether I use 1.1 or 1.2.  It worked yesterday when I added some info into the usage notes for the drives. Now nothing when I try to go to myMain and I find this in the syslog.

 

Vault unmenu[1253]: gawk: ./07-unmenu-mymain.awk:232: fatal: function `GetDiskSpinState' not defined
Link to comment
  • Squid locked this topic
Guest
This topic is now closed to further replies.