system.cgi - gopherhole - My gopherhole source code.
 (HTM) git clone git://jay.scot/gopherhole
 (DIR) Log
 (DIR) Files
 (DIR) Refs
       ---
       system.cgi (863B)
       ---
            1 #!/bin/sh
            2 
            3 hostname=$(hostname)
            4 uptime=$(uptime | sed 's/.*up \([^,]*\), .*/\1/')
            5 load=$(uptime | awk -F'[a-z]:' '{print $2}')
            6 os=$(uname -rsm)
            7 packages="$(pkg_info -a | wc -l | sed 's/ //g')"
            8 
            9 printf "[jay.scot]\n[SERVER]\n\n"
           10 
           11 cat ./openbsd-logo.txt
           12 
           13 printf "\n
           14 This gopherhole is currently at OpenBSD Amsterdam. I would love to host
           15 this locally on a raspberry Pi or similar but I live in rural Scotland
           16 where my internet can be very temperamental. The current host also
           17 donates €15 per VM to the OpenBSD project which is a great touch."
           18 
           19 printf "\n\n\n"
           20 printf "\tserver hostname     : %s\n" "$hostname"
           21 printf "\toperating system    : %s\n" "$os"
           22 printf "\tinstalled packages  : %s\n" "$packages"
           23 printf "\tserver software     : geomyidae, git, git-daemon\n"
           24 printf "\tsystem uptime       : %s\n" "$uptime"
           25 printf "\tload average        :%s\n\n\n" "$load"