diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..e594810
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+*.rpm
+*.log
+*spec-20*
+*.tar.xz
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..f0a2489
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,21 @@
+# Makefile for source rpm: smeserver-diskusage
+# $Id: Makefile,v 1.1 2020/10/12 15:08:42 brianr Exp $
+NAME := smeserver-diskusage
+SPECFILE = $(firstword $(wildcard *.spec))
+
+define find-makefile-common
+for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
+endef
+
+MAKEFILE_COMMON := $(shell $(find-makefile-common))
+
+ifeq ($(MAKEFILE_COMMON),)
+# attept a checkout
+define checkout-makefile-common
+test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
+endef
+
+MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
+endif
+
+include $(MAKEFILE_COMMON)
diff --git a/README.md b/README.md
index 81c2980..48cb22d 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,15 @@
-# smeserver-diskusage
+# smeserver-diskusage
-SMEServer Koozali developed git repo for smeserver-diskusage smecontribs
\ No newline at end of file
+SMEServer Koozali developed git repo for smeserver-diskusage smecontribs
+
+## Wiki
+
https://wiki.koozali.org/Diskusage
+
+## Bugzilla
+Show list of outstanding bugs: [here](https://bugs.koozali.org/buglist.cgi?component=smeserver-diskusage&product=SME%20Contribs&query_format=advanced&limit=0&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=CONFIRMED)
+
+## Description
+
+
*This description has been generated by an LLM AI system and cannot be relied on to be fully correct.*
+*Once it has been checked, then this comment will be deleted*
+
diff --git a/contriborbase b/contriborbase
new file mode 100644
index 0000000..9b7fd51
--- /dev/null
+++ b/contriborbase
@@ -0,0 +1 @@
+contribs10
diff --git a/createlinks b/createlinks
new file mode 100755
index 0000000..b79c470
--- /dev/null
+++ b/createlinks
@@ -0,0 +1,23 @@
+#!/usr/bin/perl -w
+use esmith::Build::CreateLinks qw(:all);
+# our event specific for updating with yum without reboot
+$event = 'smeserver-diskusage-update';
+#add here the path to your templates needed to expand
+#see the /etc/systemd/system-preset/49-koozali.preset should be present for systemd integration on all you yum update event
+
+foreach my $file (qw(
+ /etc/systemd/system-preset/49-koozali.preset
+))
+{
+ templates2events( $file, $event );
+}
+#action needed in case we have a systemd unit
+event_link('systemd-default', $event, '10');
+event_link('systemd-reload', $event, '50');
+#action specific to this package
+#event_link('action', $event, '30');
+#services we need to restart
+#safe_symlink('restart', 'root/etc/e-smith/events/$event/services2adjust/)
+#and Server Manager panel link
+panel_link('diskusage', 'manager');
+
diff --git a/root/etc/e-smith/locale/bg/etc/e-smith/web/functions/diskusage b/root/etc/e-smith/locale/bg/etc/e-smith/web/functions/diskusage
new file mode 100644
index 0000000..068266b
--- /dev/null
+++ b/root/etc/e-smith/locale/bg/etc/e-smith/web/functions/diskusage
@@ -0,0 +1,30 @@
+
+
+
+
+ FORM_TITLE
+ Използване на диска
+
+
+
+ IBAYS
+ Инфо-слотове
+
+
+
+ USERS
+ Потребители
+
+
+
+ USAGE
+ Използвано
+
+
+
+ PATH
+ Път
+
+
+
diff --git a/root/etc/e-smith/locale/da/etc/e-smith/web/functions/diskusage b/root/etc/e-smith/locale/da/etc/e-smith/web/functions/diskusage
new file mode 100644
index 0000000..3c6ae85
--- /dev/null
+++ b/root/etc/e-smith/locale/da/etc/e-smith/web/functions/diskusage
@@ -0,0 +1,30 @@
+
+
+
+
+ FORM_TITLE
+ Diskforbrug
+
+
+
+ IBAYS
+ I-bays
+
+
+
+ USERS
+ Brugere
+
+
+
+ USAGE
+ Brug
+
+
+
+ PATH
+ Sti
+
+
+
diff --git a/root/etc/e-smith/locale/de/etc/e-smith/web/functions/diskusage b/root/etc/e-smith/locale/de/etc/e-smith/web/functions/diskusage
new file mode 100644
index 0000000..47d614d
--- /dev/null
+++ b/root/etc/e-smith/locale/de/etc/e-smith/web/functions/diskusage
@@ -0,0 +1,30 @@
+
+
+
+
+ FORM_TITLE
+ Festplattenverwendung
+
+
+
+ IBAYS
+ I-bays
+
+
+
+ USERS
+ Benutzer
+
+
+
+ USAGE
+ Benutzung
+
+
+
+ PATH
+ Pfad
+
+
+
diff --git a/root/etc/e-smith/locale/el/etc/e-smith/web/functions/diskusage b/root/etc/e-smith/locale/el/etc/e-smith/web/functions/diskusage
new file mode 100644
index 0000000..4127764
--- /dev/null
+++ b/root/etc/e-smith/locale/el/etc/e-smith/web/functions/diskusage
@@ -0,0 +1,30 @@
+
+
+
+
+ FORM_TITLE
+ Disk usage
+
+
+
+ IBAYS
+ I-bays
+
+
+
+ USERS
+ Χρήστες
+
+
+
+ USAGE
+ Χρήση
+
+
+
+ PATH
+ Μονοπάτι
+
+
+
diff --git a/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/diskusage b/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/diskusage
new file mode 100644
index 0000000..1de8d8d
--- /dev/null
+++ b/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/diskusage
@@ -0,0 +1,30 @@
+
+
+
+
+ FORM_TITLE
+ Disk usage
+
+
+
+ IBAYS
+ I-bays
+
+
+
+ USERS
+ Users
+
+
+
+ USAGE
+ Usage
+
+
+
+ PATH
+ Path
+
+
+
diff --git a/root/etc/e-smith/locale/es/etc/e-smith/web/functions/diskusage b/root/etc/e-smith/locale/es/etc/e-smith/web/functions/diskusage
new file mode 100644
index 0000000..9ae8559
--- /dev/null
+++ b/root/etc/e-smith/locale/es/etc/e-smith/web/functions/diskusage
@@ -0,0 +1,30 @@
+
+
+
+
+ FORM_TITLE
+ Disk usage
+
+
+
+ IBAYS
+ I-bays
+
+
+
+ USERS
+ Usuarios
+
+
+
+ USAGE
+ Uso
+
+
+
+ PATH
+ Ruta
+
+
+
diff --git a/root/etc/e-smith/locale/et/etc/e-smith/web/functions/diskusage b/root/etc/e-smith/locale/et/etc/e-smith/web/functions/diskusage
new file mode 100644
index 0000000..60baa20
--- /dev/null
+++ b/root/etc/e-smith/locale/et/etc/e-smith/web/functions/diskusage
@@ -0,0 +1,30 @@
+
+
+
+
+ FORM_TITLE
+ Kettakasutus
+
+
+
+ IBAYS
+ I-bays
+
+
+
+ USERS
+ Kasutajad
+
+
+
+ USAGE
+ Kasutus
+
+
+
+ PATH
+ Path
+
+
+
diff --git a/root/etc/e-smith/locale/fr/etc/e-smith/web/functions/diskusage b/root/etc/e-smith/locale/fr/etc/e-smith/web/functions/diskusage
new file mode 100644
index 0000000..6a237bf
--- /dev/null
+++ b/root/etc/e-smith/locale/fr/etc/e-smith/web/functions/diskusage
@@ -0,0 +1,30 @@
+
+
+
+
+ FORM_TITLE
+ Utilisation du disque
+
+
+
+ IBAYS
+ Ibays
+
+
+
+ USERS
+ Utilisateurs
+
+
+
+ USAGE
+ Utilisation
+
+
+
+ PATH
+ Chemin
+
+
+
diff --git a/root/etc/e-smith/locale/he/etc/e-smith/web/functions/diskusage b/root/etc/e-smith/locale/he/etc/e-smith/web/functions/diskusage
new file mode 100644
index 0000000..d3da0dd
--- /dev/null
+++ b/root/etc/e-smith/locale/he/etc/e-smith/web/functions/diskusage
@@ -0,0 +1,30 @@
+
+
+
+
+ FORM_TITLE
+ Disk usage
+
+
+
+ IBAYS
+ I-bays
+
+
+
+ USERS
+ משתמשים
+
+
+
+ USAGE
+ שימוש
+
+
+
+ PATH
+ Path
+
+
+
diff --git a/root/etc/e-smith/locale/hu/etc/e-smith/web/functions/diskusage b/root/etc/e-smith/locale/hu/etc/e-smith/web/functions/diskusage
new file mode 100644
index 0000000..b1ed959
--- /dev/null
+++ b/root/etc/e-smith/locale/hu/etc/e-smith/web/functions/diskusage
@@ -0,0 +1,30 @@
+
+
+
+
+ FORM_TITLE
+ Disk usage
+
+
+
+ IBAYS
+ I-bays
+
+
+
+ USERS
+ Felhasználók
+
+
+
+ USAGE
+ Használat
+
+
+
+ PATH
+ Path
+
+
+
diff --git a/root/etc/e-smith/locale/id/etc/e-smith/web/functions/diskusage b/root/etc/e-smith/locale/id/etc/e-smith/web/functions/diskusage
new file mode 100644
index 0000000..3561cb5
--- /dev/null
+++ b/root/etc/e-smith/locale/id/etc/e-smith/web/functions/diskusage
@@ -0,0 +1,30 @@
+
+
+
+
+ FORM_TITLE
+ Disk usage
+
+
+
+ IBAYS
+ I-bays
+
+
+
+ USERS
+ Pengguna
+
+
+
+ USAGE
+ Pemakaian
+
+
+
+ PATH
+ Path
+
+
+
diff --git a/root/etc/e-smith/locale/it/etc/e-smith/web/functions/diskusage b/root/etc/e-smith/locale/it/etc/e-smith/web/functions/diskusage
new file mode 100644
index 0000000..28a82af
--- /dev/null
+++ b/root/etc/e-smith/locale/it/etc/e-smith/web/functions/diskusage
@@ -0,0 +1,30 @@
+
+
+
+
+ FORM_TITLE
+ Utilizzo del disco
+
+
+
+ IBAYS
+ I-bays
+
+
+
+ USERS
+ Utenti
+
+
+
+ USAGE
+ Utilizzo
+
+
+
+ PATH
+ Percorso
+
+
+
diff --git a/root/etc/e-smith/locale/ja/etc/e-smith/web/functions/diskusage b/root/etc/e-smith/locale/ja/etc/e-smith/web/functions/diskusage
new file mode 100644
index 0000000..2fa0148
--- /dev/null
+++ b/root/etc/e-smith/locale/ja/etc/e-smith/web/functions/diskusage
@@ -0,0 +1,30 @@
+
+
+
+
+ FORM_TITLE
+ Disk usage
+
+
+
+ IBAYS
+ I-bays
+
+
+
+ USERS
+ ユーザ
+
+
+
+ USAGE
+ Usage
+
+
+
+ PATH
+ パス
+
+
+
diff --git a/root/etc/e-smith/locale/nb/etc/e-smith/web/functions/diskusage b/root/etc/e-smith/locale/nb/etc/e-smith/web/functions/diskusage
new file mode 100644
index 0000000..4e1c63e
--- /dev/null
+++ b/root/etc/e-smith/locale/nb/etc/e-smith/web/functions/diskusage
@@ -0,0 +1,30 @@
+
+
+
+
+ FORM_TITLE
+ Disk usage
+
+
+
+ IBAYS
+ I-bays
+
+
+
+ USERS
+ Brukere
+
+
+
+ USAGE
+ Bruk
+
+
+
+ PATH
+ Sti
+
+
+
diff --git a/root/etc/e-smith/locale/nl/etc/e-smith/web/functions/diskusage b/root/etc/e-smith/locale/nl/etc/e-smith/web/functions/diskusage
new file mode 100644
index 0000000..900a164
--- /dev/null
+++ b/root/etc/e-smith/locale/nl/etc/e-smith/web/functions/diskusage
@@ -0,0 +1,30 @@
+
+
+
+
+ FORM_TITLE
+ Gebruikte opslagruimte
+
+
+
+ IBAYS
+ Informatie-baaien
+
+
+
+ USERS
+ Gebruikers
+
+
+
+ USAGE
+ Gebruik
+
+
+
+ PATH
+ Pad
+
+
+
diff --git a/root/etc/e-smith/locale/pl/etc/e-smith/web/functions/diskusage b/root/etc/e-smith/locale/pl/etc/e-smith/web/functions/diskusage
new file mode 100644
index 0000000..6aa16d4
--- /dev/null
+++ b/root/etc/e-smith/locale/pl/etc/e-smith/web/functions/diskusage
@@ -0,0 +1,30 @@
+
+
+
+
+ FORM_TITLE
+ Użycie dysku
+
+
+
+ IBAYS
+ I-bays
+
+
+
+ USERS
+ Użytkownicy
+
+
+
+ USAGE
+ Wykorzystanie
+
+
+
+ PATH
+ Ścieżka
+
+
+
diff --git a/root/etc/e-smith/locale/pt-br/etc/e-smith/web/functions/diskusage b/root/etc/e-smith/locale/pt-br/etc/e-smith/web/functions/diskusage
new file mode 100644
index 0000000..d6c9c24
--- /dev/null
+++ b/root/etc/e-smith/locale/pt-br/etc/e-smith/web/functions/diskusage
@@ -0,0 +1,30 @@
+
+
+
+
+ FORM_TITLE
+ Uso do Disco
+
+
+
+ IBAYS
+ Compartilhamentos
+
+
+
+ USERS
+ Usuários
+
+
+
+ USAGE
+ Uso
+
+
+
+ PATH
+ Caminho
+
+
+
diff --git a/root/etc/e-smith/locale/pt/etc/e-smith/web/functions/diskusage b/root/etc/e-smith/locale/pt/etc/e-smith/web/functions/diskusage
new file mode 100644
index 0000000..056bd42
--- /dev/null
+++ b/root/etc/e-smith/locale/pt/etc/e-smith/web/functions/diskusage
@@ -0,0 +1,30 @@
+
+
+
+
+ FORM_TITLE
+ Disk usage
+
+
+
+ IBAYS
+ I-bays
+
+
+
+ USERS
+ Usuários
+
+
+
+ USAGE
+ Utilização
+
+
+
+ PATH
+ Caminho
+
+
+
diff --git a/root/etc/e-smith/locale/ro/etc/e-smith/web/functions/diskusage b/root/etc/e-smith/locale/ro/etc/e-smith/web/functions/diskusage
new file mode 100644
index 0000000..e4aca0a
--- /dev/null
+++ b/root/etc/e-smith/locale/ro/etc/e-smith/web/functions/diskusage
@@ -0,0 +1,30 @@
+
+
+
+
+ FORM_TITLE
+ Disk usage
+
+
+
+ IBAYS
+ I-bays
+
+
+
+ USERS
+ Utilizatori
+
+
+
+ USAGE
+ Utilizare
+
+
+
+ PATH
+ Cale
+
+
+
diff --git a/root/etc/e-smith/locale/ru/etc/e-smith/web/functions/diskusage b/root/etc/e-smith/locale/ru/etc/e-smith/web/functions/diskusage
new file mode 100644
index 0000000..c96dcfa
--- /dev/null
+++ b/root/etc/e-smith/locale/ru/etc/e-smith/web/functions/diskusage
@@ -0,0 +1,30 @@
+
+
+
+
+ FORM_TITLE
+ Disk usage
+
+
+
+ IBAYS
+ I-bays
+
+
+
+ USERS
+ Пользователи
+
+
+
+ USAGE
+ Использование
+
+
+
+ PATH
+ Путь
+
+
+
diff --git a/root/etc/e-smith/locale/sl/etc/e-smith/web/functions/diskusage b/root/etc/e-smith/locale/sl/etc/e-smith/web/functions/diskusage
new file mode 100644
index 0000000..ad06460
--- /dev/null
+++ b/root/etc/e-smith/locale/sl/etc/e-smith/web/functions/diskusage
@@ -0,0 +1,30 @@
+
+
+
+
+ FORM_TITLE
+ Disk usage
+
+
+
+ IBAYS
+ I-bays
+
+
+
+ USERS
+ Uporabniki
+
+
+
+ USAGE
+ Porabljeno
+
+
+
+ PATH
+ Pot
+
+
+
diff --git a/root/etc/e-smith/locale/sv/etc/e-smith/web/functions/diskusage b/root/etc/e-smith/locale/sv/etc/e-smith/web/functions/diskusage
new file mode 100644
index 0000000..b5a386b
--- /dev/null
+++ b/root/etc/e-smith/locale/sv/etc/e-smith/web/functions/diskusage
@@ -0,0 +1,30 @@
+
+
+
+
+ FORM_TITLE
+ Disk usage
+
+
+
+ IBAYS
+ I-bays
+
+
+
+ USERS
+ Användare
+
+
+
+ USAGE
+ Användning
+
+
+
+ PATH
+ Sökväg
+
+
+
diff --git a/root/etc/e-smith/locale/th/etc/e-smith/web/functions/diskusage b/root/etc/e-smith/locale/th/etc/e-smith/web/functions/diskusage
new file mode 100644
index 0000000..b349cc3
--- /dev/null
+++ b/root/etc/e-smith/locale/th/etc/e-smith/web/functions/diskusage
@@ -0,0 +1,30 @@
+
+
+
+
+ FORM_TITLE
+ Disk usage
+
+
+
+ IBAYS
+ I-bays
+
+
+
+ USERS
+ ผู้ใช้
+
+
+
+ USAGE
+ ถูกใช้ไป
+
+
+
+ PATH
+ Path
+
+
+
diff --git a/root/etc/e-smith/locale/tr/etc/e-smith/web/functions/diskusage b/root/etc/e-smith/locale/tr/etc/e-smith/web/functions/diskusage
new file mode 100644
index 0000000..c394425
--- /dev/null
+++ b/root/etc/e-smith/locale/tr/etc/e-smith/web/functions/diskusage
@@ -0,0 +1,30 @@
+
+
+
+
+ FORM_TITLE
+ Disk usage
+
+
+
+ IBAYS
+ I-bays
+
+
+
+ USERS
+ Kullanıcılar
+
+
+
+ USAGE
+ Kullanım
+
+
+
+ PATH
+ Yol
+
+
+
diff --git a/root/etc/e-smith/locale/zh-cn/etc/e-smith/web/functions/diskusage b/root/etc/e-smith/locale/zh-cn/etc/e-smith/web/functions/diskusage
new file mode 100644
index 0000000..07c7860
--- /dev/null
+++ b/root/etc/e-smith/locale/zh-cn/etc/e-smith/web/functions/diskusage
@@ -0,0 +1,30 @@
+
+
+
+
+ FORM_TITLE
+ 磁盘使用率
+
+
+
+ IBAYS
+ I-bays
+
+
+
+ USERS
+ 用户
+
+
+
+ USAGE
+ 使用率
+
+
+
+ PATH
+ 路径
+
+
+
diff --git a/root/etc/e-smith/locale/zh-tw/etc/e-smith/web/functions/diskusage b/root/etc/e-smith/locale/zh-tw/etc/e-smith/web/functions/diskusage
new file mode 100644
index 0000000..d2369f6
--- /dev/null
+++ b/root/etc/e-smith/locale/zh-tw/etc/e-smith/web/functions/diskusage
@@ -0,0 +1,30 @@
+
+
+
+
+ FORM_TITLE
+ 磁碟用量
+
+
+
+ IBAYS
+ I-bays
+
+
+
+ USERS
+ 使用者
+
+
+
+ USAGE
+ 使用量
+
+
+
+ PATH
+ 路徑
+
+
+
diff --git a/root/etc/e-smith/web/functions/diskusage b/root/etc/e-smith/web/functions/diskusage
new file mode 100755
index 0000000..2c48809
--- /dev/null
+++ b/root/etc/e-smith/web/functions/diskusage
@@ -0,0 +1,32 @@
+#!/usr/bin/perl -wT
+# vim: ft=xml:
+
+#----------------------------------------------------------------------
+# heading : Administration
+# description : Disk usage
+# navigation : 1000 1000
+#----------------------------------------------------------------------
+
+use strict;
+use warnings;
+
+use esmith::FormMagick::Panel::diskusage;
+
+my $f = esmith::FormMagick::Panel::diskusage->new();
+$f->display();
+
+__DATA__
+
diff --git a/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/diskusage.pm b/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/diskusage.pm
new file mode 100644
index 0000000..29601a7
--- /dev/null
+++ b/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/diskusage.pm
@@ -0,0 +1,116 @@
+#!/usr/bin/perl -w
+package esmith::FormMagick::Panel::diskusage;
+
+use strict;
+use warnings;
+use esmith::FormMagick;
+use esmith::AccountsDB;
+use esmith::ConfigDB;
+use esmith::cgi;
+use esmith::util;
+use File::Basename;
+use Exporter;
+use Carp qw(verbose);
+
+our @ISA = qw(esmith::FormMagick Exporter);
+
+our @EXPORT = qw();
+
+our $VERSION = sprintf '%d.%03d', q$Revision: 1.1 $ =~ /: (\d+).(\d+)/;
+
+our $accountdb = esmith::AccountsDB->open();
+our $configdb = esmith::ConfigDB->open();
+
+sub print_filesystem_usage {
+ my $self = shift;
+ my $q = $self->{cgi};
+
+ print $q->p (" \n");
+ print $q->p (`/bin/date`);
+ my $FileSystemUsage = `/bin/df -h`;
+
+ print $q->p ($q->pre ("$FileSystemUsage"));
+ return "";
+}
+
+sub print_ibay_table {
+ my $self = shift;
+ my $q = $self->{cgi};
+ my $name = $self->localise('IBAYS');
+ my $usage = $self->localise('USAGE');
+ my $path = $self->localise('PATH');
+ my @ibays = $accountdb->ibays();
+
+ print $q->start_table({-CLASS => "sme-border"}),"\n";
+ print $q->Tr (
+ esmith::cgi::genSmallCell($q, $name,"header"),
+ esmith::cgi::genSmallCell($q, $usage,"header"),
+ esmith::cgi::genSmallCell($q, $path,"header")),"\n";
+ my $scriptname = basename($0);
+
+ foreach my $i (@ibays)
+ {
+ my $ibayname = $i->key();
+ my @ibayusage = split(/\s/, (`/usr/bin/du -hs /home/e-smith/files/ibays/$ibayname`));
+ print $q->Tr (
+ esmith::cgi::genSmallCell($q, $ibayname,"normal"),
+ esmith::cgi::genSmallCell($q, $ibayusage[0],"normal"),
+ esmith::cgi::genSmallCell($q, $ibayusage[1],"normal"));
+ }
+
+ # opt
+ {
+ my @optusage = split(/\s/, (`/usr/bin/du -hs /opt`));
+ print $q->Tr (
+ esmith::cgi::genSmallCell($q, 'opt',"normal"),
+ esmith::cgi::genSmallCell($q, $optusage[0],"normal"),
+ esmith::cgi::genSmallCell($q, $optusage[1],"normal"));
+ }
+
+ print $q->end_table,"\n";
+
+ return "";
+}
+
+sub print_user_table {
+ my $self = shift;
+ my $q = $self->{cgi};
+ my $name = $self->localise('USERS');
+ my $usage = $self->localise('USAGE');
+ my $path = $self->localise('PATH');
+ my @users = $accountdb->users();
+
+ print $q->p (" \n");
+
+ print $q->start_table({-CLASS => "sme-border"}),"\n";
+ print $q->Tr (
+ esmith::cgi::genSmallCell($q, $name,"header"),
+ esmith::cgi::genSmallCell($q, $usage,"header"),
+ esmith::cgi::genSmallCell($q, $path,"header")),"\n";
+ my $scriptname = basename($0);
+
+ # root
+ {
+ my @rootusage = split(/\s/, (`/usr/bin/du -hs /root`));
+ print $q->Tr (
+ esmith::cgi::genSmallCell($q, 'root',"normal"),
+ esmith::cgi::genSmallCell($q, $rootusage[0],"normal"),
+ esmith::cgi::genSmallCell($q, $rootusage[1],"normal"));
+ }
+
+ foreach my $i (@users)
+ {
+ my $username = $i->key();
+ my @userusage = split(/\s/, (`/usr/bin/du -hs /home/e-smith/files/users/$username`));
+ print $q->Tr (
+ esmith::cgi::genSmallCell($q, $username,"normal"),
+ esmith::cgi::genSmallCell($q, $userusage[0],"normal"),
+ esmith::cgi::genSmallCell($q, $userusage[1],"normal"));
+ }
+
+ print $q->end_table,"\n";
+
+ return "";
+}
+
+1;
diff --git a/smeserver-diskusage.spec b/smeserver-diskusage.spec
new file mode 100644
index 0000000..6ea0959
--- /dev/null
+++ b/smeserver-diskusage.spec
@@ -0,0 +1,149 @@
+# $Id: smeserver-diskusage.spec,v 1.5 2024/09/05 03:16:47 terryfage Exp $
+# Authority: darrellmay
+# Name: Darrell May
+
+Summary: Disk usage panel for the SME Server
+%define name smeserver-diskusage
+Name: %{name}
+%define version 0.2.0
+%define release 7
+Version: %{version}
+Release: %{release}%{?dist}
+License: GPL
+Group: Networking/Daemons
+Source: %{name}-%{version}.tar.xz
+BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot
+BuildArchitectures: noarch
+Requires: e-smith-base, smeserver-release >= 9.0
+Requires: e-smith-formmagick
+BuildRequires: e-smith-devtools
+Obsoletes: dmc-mitel-diskusage
+AutoReqProv: no
+
+%description
+Disk usage panel showing filesystem, i-bay and user statistics.
+
+%changelog
+* Sat Sep 07 2024 cvs2git.sh aka Brian Read 0.2.0-7.sme
+- Roll up patches and move to git repo [SME: 12338]
+
+* Sat Sep 07 2024 BogusDateBot
+- Eliminated rpmbuild "bogus date" warnings due to inconsistent weekday,
+ by assuming the date is correct and changing the weekday.
+
+* Thu Sep 05 2024 Terry Fage 0.0.2-6.sme
+- apply locale 2024-09-05.patch
+
+* Sun Aug 22 2021 Terry Fage 0.0.2-5.sme
+- apply locale 2021-08-22 patch
+
+* Wed Mar 24 2021 Brian Read 0.2.0-4.sme
+- Add Update event to createlinks [SME: 11030]
+
+* Wed Mar 24 2021 BogusDateBot
+- Eliminated rpmbuild "bogus date" warnings due to inconsistent weekday,
+ by assuming the date is correct and changing the weekday.
+
+* Mon Oct 12 2020 Brian Read 0.2.0-3.sme
+- Initial import to SME10 tree [SME: 11030]
+
+* Wed Jul 01 2015 stephane de Labrusse - 0.2.0-2
+- add smeserver-diskusage-0.2.0-locale-2015-07-01.patch [SME: 8966]
+
+* Sun Jun 08 2014 stephane de Labrusse - 0.2.0-1
+- First release to contribs9
+- add locale smeserver-diskusage-0.0.1-locale-2014-06-08.patch
+
+* Sun Jul 14 2013 JP Pialasse 0.0.1-22.sme
+- apply locale 2013-07-14 patch
+
+* Tue Mar 20 2012 SME Translation Server 0.0.1-21.el6
+- apply locale 2012-03-20 patch
+
+* Sun Mar 06 2011 SME Translation Server 0.0.1-20.sme
+- apply locale 2011-03-06 patch
+
+* Sun May 23 2010 SME Translation Server 0.0.1-19.sme
+- apply locale 2010-05-23 patch
+
+* Tue Mar 02 2010 SME Translation Server 0.0.1-18.sme
+- apply locale 2010-03-02 patch
+
+* Tue Oct 27 2009 SME Translation Server 0.0.1-17.sme
+- apply locale 2009-10-27 patch
+
+* Mon Aug 24 2009 SME Translation Server 0.0.1-16.sme
+- apply locale 2009-08-24 patch
+
+* Wed May 20 2009 SME Translation Server 0.0.1-15.sme
+- apply locale 2009-05-20 patch
+
+* Mon Apr 27 2009 SME Translation Server 0.0.1-14.sme
+- apply locale 2009-04-27 patch
+
+* Tue Mar 03 2009 SME Translation Server
+- apply locale 2009-03-03 patch
+
+* Sun Mar 1 2009 Jonathan Martens 0.0.1-12
+- Apply 1 Mar 2009 locale patch [SME: 5018]
+
+* Sun Nov 30 2008 Jonathan Martens 0.0.1-11
+- Apply 30 Nov 2008 locale patch
+
+* Tue Oct 14 2008 Jonathan Martens 0.0.1-10
+- Apply 14 Oct 2008 locale patch
+
+* Tue Jul 1 2008 Jonathan Martens 0.0.1-9
+- Apply 1 July 2008 locale patch
+
+* Wed May 7 2008 Jonathan Martens 0.0.1-8
+- Apply 7 May 2008 locale patch
+
+* Mon May 5 2008 Jonathan Martens 0.0.1-7
+- Apply 5 May 2008 locale patch
+
+* Sat Apr 26 2008 Jonathan Martens
+- Add common tags to e-smith-formmagick's general
+
+* Wed Apr 23 2008 Jonathan Martens
+- Added 23 April 2008 locale patch
+
+* Tue Apr 22 2008 Jonathan Martens
+- Added 22 April 2008 locale patch
+
+* Mon Apr 21 2008 Shad L. Lords
+- Prep for import into buildsys
+- Clean up spec
+
+* Mon Apr 16 2007 Darrell May
+- added /opt to ibay table
+- added date header
+- [0.0.1-2]
+* Wed Mar 21 2007 Darrell May
+- split usage/path into two columns
+- [0.0.1-1]
+* Tue Mar 20 2007 Darrell May
+- renamed and rebuilt for SME 7.x
+- [0.0.1-0]
+* Fri Aug 09 2002 Darrell May
+- initial release
+- [0.0.1-1]
+
+%prep
+%setup
+
+%build
+perl createlinks
+
+%install
+rm -rf $RPM_BUILD_ROOT
+(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT)
+rm -f e-smith-%{version}-filelist
+/sbin/e-smith/genfilelist $RPM_BUILD_ROOT > %{name}-%{version}-filelist
+
+%clean
+cd ..
+rm -rf %{name}-%{version}
+
+%files -f %{name}-%{version}-filelist
+%defattr(-,root,root)