From 3d45e1748a87d4c052b64ffe361c72a04e19a452 Mon Sep 17 00:00:00 2001
From: qorg11 <qorg@vxempire.xyz>
Date: Sat, 25 Apr 2020 21:27:27 +0200
Subject: [PATCH] I'm retarded

---
 http/index.cgi | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/http/index.cgi b/http/index.cgi
index 5044905..dfd7fae 100755
--- a/http/index.cgi
+++ b/http/index.cgi
@@ -14,6 +14,11 @@
 # You should have received a copy of the GNU General Public License
 # along with lainsafe.  If not, see <https://www.gnu.org/licenses/>.
 
+$disk_size = `df -h | awk 'NR==2 {print \$2; exit}'`;
+$disk_usage = `df -h | awk 'NR==2 {print \$3; exit}')`;
+$disk_free = `df -h | awk 'NR==2 {print \$4; exit}'`;
+$disk_percentage = `df -h | awk 'NR==2 {print \$5; exit}'`;
+
 my $currently_used = `du -h files`;
 $currently_used =~ s/files//;
 my $total = "32GB"; # Put here what you use.
@@ -38,4 +43,4 @@ print "<!DOCTYPE html>
   </body>
     </html>";
 
-print "$currently_used available from $total";
+print $disk_free ." available from ". $disk_size ." total";
-- 
GitLab