Mint Serena 64 bit using the Mate desktop environment. Most of the following scripts will run on this machine, although some have only been tested with the Gnome desktop. Extra software requirements can be met by the Ubuntu and safe PPA repositories. Scripts may be re-written or added to from time to time, the date serves as the version number. Syntax highlighting on these pages is provided by GVim's "Convert to HTML" option.


# Filename:
# Version: 170816
# Author: robz
# Report for activity, HTML page served by nginx.
# Root crontab
# Update index.html page.
# @reboot /home/pi/Downloads/scripts/ > /dev/null 2>&1
# Kill server.
# 00 18 * * * sudo /etc/init.d/nginx stop

boot="$(date -d "@"$(awk '/btime/{print $2}' /proc/stat) +"%H:%M:%S")"
stor="$(df -h / | awk 'NR==2 {print $5}')"
lst1="$(cat "/home/pi/Downloads/log/motd.txt")"
lst2="$(grep -v '^$\|^\s*\#' "$lst2" | nl -w3 -s ')  ')"

cat > /usr/share/nginx/www/index.html << EOF
<!DOCTYPE html>
  <title>robz Report</title>
    html {
      background: url(pi.jpg) no-repeat center center fixed;
      background-size: cover;
      -webkit-background-size: cover;
      -o-background-size: cover;
    h1 {
      color: #BD1143; text-shadow: 2px 2px 1px #FFFFFF;
      font-size: 40px; font-style: italic;
    h3 {
      font-style: italic; font-weight: 600;
      margin: 0;
    body {
      color: #FFFFFF;
      font-family: sans-serif; font-size: 12px; font-weight: 500;
      margin-left: 25px;
    .footer {
      color: #BD1143;
      font-size: 8px; font-style: italic; font-weight: 700;
      position: fixed;
      bottom: 5px; right: 5px;
<h1>The <img src="pi5.png" align="top" width="34" height="42"> Pi Torrent Box...
<h3> Download report for $(date +%A" "%d" "%B)</h3>
 Machine last rebooted at $boot - SD card usage is currently at $stor
<br> Tracked shows.:
<span class="footer">Raspberry powered page by robz</span>

No comments: