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.

Please add the emhttp listening port to the php variables

Featured Replies

I love the fact that "$var['version']" was added so we can act on the unRAID version.

 

It would also help if a variable "$var['emhttp_port']" was populated so we can determine which port is in use by emhttp.

 

Yes, it can be done with netstat, egrep, and awk, but it would be nice to have it available without having to shell out.

Added in -beta2 as "$var['emhttpPort']".

 

About those $var's... From examining template.php you can see that:

 

vars - general variables

sec - security settings per share (for CIFS)

devs - devices not yet added into array or assigned to cache

disks - info about each array disk, including cache disk

users - info about each user

shares - info about each user share

sec_nfs - security settings per share (for NFS) [starting in -beta2]

 

are initialized by reading corresponding 'ini' formatted files in /var/local/emhttp.  This set of variables is collectively referred to as the "config data" (i.e, the unRAID configuration data).

 

Those files in /var/local/emhttp are re-generated each time, and prior to, any PHP file is rendered.  Hence every time PHP is invoked, there is a fresh 'snapshot' of the the config data available to the PHP script.

 

So if you are going to use lighttpd/php-cgi and intend to operate on the unRAID config, we will need to add a mechanism whereby those files can get regenerated... this shouldn't be too difficult.

 

Some other notes concerning the config data:

- variables in $var in all upper-case are generally used in other system scripts (there are some exceptions which will get fixed as beta proceeds)

- you don't really need a separate utility to view the 'mdcmd' variables since they are all included in the config data

- the set of 'config data' may undergo additions/deletions/name changes as 5.0-beta series progresses, but by the time 5.0 gets out of beta, it should be mostly "set in stone"

is it possible to add the unraid version into /etc as in

 

/etc/unraid-release

 

[rcotrone@underlord ~]$ cat /etc/redhat-release 
CentOS release 5.5 (Final)

rcotrone@rgclws ~ $cat /etc/redhat-release 
Red Hat Linux release 7.2 (Enigma)

 

I don't think we can always depend on uname -a as sometimes the kernel stays the same.

  • Author
you don't really need a separate utility to view the 'mdcmd' variables since they are all included in the config data

 

Understood.  I wrote the plugin that does it, so some monitoring program on a windows desktop client (like FEMUR) can query them over http, and not have to query the whole bloody thing and then parse it on the client.

is it possible to add the unraid version into /etc as in

 

/etc/unraid-release

 

Sure I can do that, you don't want to "grep version /var/local/emhttp/var.ini"?

is it possible to add the unraid version into /etc as in

 

/etc/unraid-release

 

Sure I can do that, you don't want to "grep version /var/local/emhttp/var.ini"?

 

I did not think of greping that file.

I mentioned it more so it was like other distros which use the /etc/distroname-release

 

Some use version, some use release.

 

root@slacky:~# cat /etc/slackware-version  
Slackware 12.0.0

 

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.