From 48de610c784f6b034fa4a57ddfed5723afdb3aa7 Mon Sep 17 00:00:00 2001
From: Ben Harris
Date: Sun, 14 Jun 2020 21:07:50 -0400
Subject: [PATCH] add symlinks and tidy uptime.sh
---
cgi-bin/env.sh.txt | 1 +
cgi-bin/index.php | 7 +++----
cgi-bin/info.sh.txt | 1 +
cgi-bin/ip.sh.txt | 1 +
cgi-bin/loadavg.sh.txt | 1 +
cgi-bin/sysinfo.sh.txt | 1 +
cgi-bin/tagline.sh.txt | 1 +
cgi-bin/teapot.sh.txt | 1 +
cgi-bin/uptime.sh | 2 +-
cgi-bin/uptime.sh.txt | 1 +
ttbp/index.html | 4 ++--
11 files changed, 14 insertions(+), 7 deletions(-)
create mode 120000 cgi-bin/env.sh.txt
create mode 120000 cgi-bin/info.sh.txt
create mode 120000 cgi-bin/ip.sh.txt
create mode 120000 cgi-bin/loadavg.sh.txt
create mode 120000 cgi-bin/sysinfo.sh.txt
create mode 120000 cgi-bin/tagline.sh.txt
create mode 120000 cgi-bin/teapot.sh.txt
create mode 120000 cgi-bin/uptime.sh.txt
diff --git a/cgi-bin/env.sh.txt b/cgi-bin/env.sh.txt
new file mode 120000
index 0000000..1789b02
--- /dev/null
+++ b/cgi-bin/env.sh.txt
@@ -0,0 +1 @@
+./env.sh
\ No newline at end of file
diff --git a/cgi-bin/index.php b/cgi-bin/index.php
index f705814..3a4478e 100644
--- a/cgi-bin/index.php
+++ b/cgi-bin/index.php
@@ -11,10 +11,9 @@
here are some scripts i've been playing with
-
- -> =$cgi?>
+
+ -> =$cgi?>
sources available on tildegit
diff --git a/cgi-bin/info.sh.txt b/cgi-bin/info.sh.txt
new file mode 120000
index 0000000..11c522e
--- /dev/null
+++ b/cgi-bin/info.sh.txt
@@ -0,0 +1 @@
+./info.sh
\ No newline at end of file
diff --git a/cgi-bin/ip.sh.txt b/cgi-bin/ip.sh.txt
new file mode 120000
index 0000000..02bd80b
--- /dev/null
+++ b/cgi-bin/ip.sh.txt
@@ -0,0 +1 @@
+./ip.sh
\ No newline at end of file
diff --git a/cgi-bin/loadavg.sh.txt b/cgi-bin/loadavg.sh.txt
new file mode 120000
index 0000000..4998c9c
--- /dev/null
+++ b/cgi-bin/loadavg.sh.txt
@@ -0,0 +1 @@
+./loadavg.sh
\ No newline at end of file
diff --git a/cgi-bin/sysinfo.sh.txt b/cgi-bin/sysinfo.sh.txt
new file mode 120000
index 0000000..fafa5a3
--- /dev/null
+++ b/cgi-bin/sysinfo.sh.txt
@@ -0,0 +1 @@
+./sysinfo.sh
\ No newline at end of file
diff --git a/cgi-bin/tagline.sh.txt b/cgi-bin/tagline.sh.txt
new file mode 120000
index 0000000..c4b8383
--- /dev/null
+++ b/cgi-bin/tagline.sh.txt
@@ -0,0 +1 @@
+./tagline.sh
\ No newline at end of file
diff --git a/cgi-bin/teapot.sh.txt b/cgi-bin/teapot.sh.txt
new file mode 120000
index 0000000..a406a3a
--- /dev/null
+++ b/cgi-bin/teapot.sh.txt
@@ -0,0 +1 @@
+./teapot.sh
\ No newline at end of file
diff --git a/cgi-bin/uptime.sh b/cgi-bin/uptime.sh
index 01a3aba..11a2255 100755
--- a/cgi-bin/uptime.sh
+++ b/cgi-bin/uptime.sh
@@ -7,7 +7,7 @@ printf '{"hostname": "%s", "uptime": "%s", "since": "%s", "users": "%s"}\n' \
"$(hostname)" \
"$(uptime | sed -e "s/.* up *//" -e "s/ *days, */d/" -e "s/:/h/" -e "s/,.*/m/")" \
"$(uptime -s)" \
- "$(online-users)"
+ "$(who | grep -v tmux | cut -d' ' -f1 | sort -u | wc -l)"
exit 0
diff --git a/cgi-bin/uptime.sh.txt b/cgi-bin/uptime.sh.txt
new file mode 120000
index 0000000..1da6f81
--- /dev/null
+++ b/cgi-bin/uptime.sh.txt
@@ -0,0 +1 @@
+./uptime.sh
\ No newline at end of file
diff --git a/ttbp/index.html b/ttbp/index.html
index 2591574..1857764 100644
--- a/ttbp/index.html
+++ b/ttbp/index.html
@@ -296,9 +296,10 @@ or open a github issue and i'll get back to you as soon as i can.