Merge branch 'master' into storageareas
commit
fdcb93eacc
|
@ -58,8 +58,10 @@ override_dh_auto_install:
|
|||
|
||||
override_dh_fixperms:
|
||||
dh_fixperms
|
||||
## 637685
|
||||
chmod -c o-r $(CURDIR)/debian/zoneminder/etc/zm/zm.conf
|
||||
#
|
||||
# As requested by the Debian Webapps Policy Manual §3.2.1
|
||||
chown root:www-data $(CURDIR)/debian/zoneminder/etc/zm/zm.conf
|
||||
chmod 640 $(CURDIR)/debian/zoneminder/etc/zm/zm.conf
|
||||
|
||||
override_dh_installinit:
|
||||
dh_installinit --no-start
|
||||
|
|
|
@ -58,8 +58,10 @@ override_dh_auto_install:
|
|||
|
||||
override_dh_fixperms:
|
||||
dh_fixperms
|
||||
## 637685
|
||||
chmod -c o-r $(CURDIR)/debian/zoneminder/etc/zm/zm.conf
|
||||
#
|
||||
# As requested by the Debian Webapps Policy Manual §3.2.1
|
||||
chown root:www-data $(CURDIR)/debian/zoneminder/etc/zm/zm.conf
|
||||
chmod 640 $(CURDIR)/debian/zoneminder/etc/zm/zm.conf
|
||||
|
||||
override_dh_installinit:
|
||||
dh_installinit --no-start
|
||||
|
|
|
@ -1417,15 +1417,18 @@ function getLoad() {
|
|||
|
||||
function getDiskPercent($path = ZM_DIR_EVENTS) {
|
||||
$total = disk_total_space($path);
|
||||
if ( ! $total ) {
|
||||
Error("disk_total_space returned false for " . $path );
|
||||
if ( $total === false ) {
|
||||
Error("disk_total_space returned false. Verify the web account user has access to " . $path );
|
||||
return 0;
|
||||
} elseif ( $total == 0 ) {
|
||||
Error("disk_total_space indicates the following path has a filesystem size of zero bytes" . $path );
|
||||
return 100;
|
||||
}
|
||||
$free = disk_free_space($path);
|
||||
if ( ! $free ) {
|
||||
Error("disk_free_space returned false for " . $path );
|
||||
if ( $free === false ) {
|
||||
Error("disk_free_space returned false. Verify the web account user has access to " . $path );
|
||||
}
|
||||
$space = round(($total - $free) / $total * 100);
|
||||
$space = round((($total - $free) / $total) * 100);
|
||||
return( $space );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue