From b3140d5ced5a52bd8346368b551eb1ecd41441c1 Mon Sep 17 00:00:00 2001 From: KemoNine Date: Mon, 3 Aug 2020 16:03:07 +0000 Subject: [PATCH] Finish up initial migration to ubuntu for docs --- docs/README.md | 14 +-- docs/cockpit.md | 7 +- docs/cron.md | 23 ----- docs/email_notifications.md | 2 +- docs/filebrowser.md | 18 ++-- docs/finalize_setup.md | 2 +- docs/landing_page.md | 7 +- docs/monit.md | 19 ++-- docs/munin.md | 190 ++++++++++++++++++------------------ docs/networking.md | 31 ++++++ docs/restic.md | 6 +- docs/slideshow.md | 2 +- docs/syncthing.md | 8 +- docs/wifi.md | 13 --- 14 files changed, 168 insertions(+), 174 deletions(-) delete mode 100644 docs/cron.md create mode 100644 docs/networking.md delete mode 100644 docs/wifi.md diff --git a/docs/README.md b/docs/README.md index d6e3e75..ae5e766 100644 --- a/docs/README.md +++ b/docs/README.md @@ -14,17 +14,17 @@ Items marked ```REQUIRED``` are assumed to be setup and working. You've been war * [Base Firmware (REQUIRED)](base.md) * [Finalize Setup (REQUIRED)](finalize_setup.md) * [Setup swap (REQUIRED)](swap.md) -* [CPU Governor](cpu_governor.md) +* [Additional Networking Setup (REQUIRED)](networking.md) * [Slideshow Prep (REQUIRED)](slideshow_prep.md) * [Slideshow Setup (REQUIRED)](slideshow.md) * [Email Notifications (REQUIRED)](email_notifications.md) -* [cron / Scheduler (REQUIRED)](cron.md) -* [Backups via restic](restic.md) -* [Additional Networking Setup (REQUIRED)](cockpit.md) -* [Web Dashboard / Landing Page](landing_page.md) * [System Monitoring (REQUIRED)](monit.md) -* [Resource Monitoring](munin.md) +* [HDMI Scheduled On/Off](scheduled_display.md) +* [CPU Governor](cpu_governor.md) +* [Backups via restic](restic.md) +* [Web Based Administration](cockpit.md) +* [Web Dashboard / Landing Page](landing_page.md) * [Web File Manager (Picture Sync)](filebrowser.md) * [SyncThing (Picture Sync)](syncthing.md) * [rclone (Picture Sync)](rclone.md) -* [HDMI Scheduled On/Off](scheduled_display.md) +* [Resource Monitoring](munin.md) diff --git a/docs/cockpit.md b/docs/cockpit.md index e7ae7ad..441c88e 100644 --- a/docs/cockpit.md +++ b/docs/cockpit.md @@ -2,17 +2,12 @@ The below commands will setup ```cockpit``` so you can manage your PiFrame from a web browser. This is wholly optional but can be useful when ssh/serial terminal access aren't available. -If you don't want the admin UI you still should install ```NetworkManager``` and ```firewalld``` as the rest of the documentation assumes these are installed. - ``` sh # Remote management on http://ip:9090 -pacman -S cockpit cockpit-pcp packagekit udisks2 networkmanager firewalld -systemctl enable --now firewalld +apt install cockpit firewall-cmd --zone=public --permanent --add-port=9090/tcp -firewall-cmd --zone=public --permanent --add-service=ssh firewall-cmd --reload -systemctl enable --now NetworkManager systemctl enable --now cockpit.socket ``` diff --git a/docs/cron.md b/docs/cron.md deleted file mode 100644 index 142c8a4..0000000 --- a/docs/cron.md +++ /dev/null @@ -1,23 +0,0 @@ -# cron/Scheduler - -The below commands will setup a cron daemon (scheduler) for running things like backups, statistic gathering and more via a schedule. While technically not required, we *strongly* recommend using cron for backups so you get the output via e-mail (or similar). This is also required if you want to monitor resource utilization via ```munin```. - -## Important Notes - -* This assumes you have setup ```msmtp``` for email notifications - -## Setup - -``` sh - -pacman -S cronie -mkdir /etc/systemd/system/cronie.service.d -cat > /etc/systemd/system/cronie.service.d/override.conf < /etc/aliases < /etc/systemd/system/filebrowser-pictures.service <> /etc/lighttpd/lighttpd.conf -mkdir /srv/http -cat > /srv/http/index.html < /var/www/html/index.html < diff --git a/docs/monit.md b/docs/monit.md index 985256b..9a6c69f 100644 --- a/docs/monit.md +++ b/docs/monit.md @@ -4,32 +4,31 @@ The below commands will setup ```monit``` to track key elements of the PiFrame h ``` sh -pacman -S monit -mkdir /etc/monit.d -nano -w /etc/monitrc - include /etc/monit.d/* +apt install monit +nano -w /etc/monit/monitrc set httpd port 2812 and use address 0.0.0.0 allow admin:monit set mailserver domain.tld port 587 username "piframe@domain.tld" password "apassword" using tls -cat > /etc/monit.d/rootfs < /etc/monit/conf.d/rootfs < 80% then alert EOF -cat > /etc/monit.d/tankfs < /etc/monit/conf.d/tankfs < 80% then alert EOF -cat > /etc/monit.d/feh < /etc/monit/conf.d/fim < /etc/lighttpd/lighttpd-munin.conf < "/munin/" ) - -\$HTTP["url"] =~ "/munin-cgi/munin-cgi-graph" { - alias.url += ( "/munin-cgi/munin-cgi-graph" => "/usr/share/munin/cgi/munin-cgi-graph" ) - cgi.assign = ( "" => "" ) -} - -#alias.url += ( "/munin/static" => "/etc/munin/static" ) -alias.url += ( "/munin" => "/usr/share/munin/www" ) - -mimetype.assign = ( - ".html" => "text/html", - ".txt" => "text/plain", - ".css" => "text/css", - ".js" => "application/x-javascript", - ".jpg" => "image/jpeg", - ".jpeg" => "image/jpeg", - ".gif" => "image/gif", - ".png" => "image/png", - "" => "application/octet-stream" - ) -EOF -cat > /etc/systemd/system/lighttpd-munin.service < /etc/lighttpd/lighttpd-munin.conf < "/munin/" ) + +\$HTTP["url"] =~ "/munin-cgi/munin-cgi-graph" { + alias.url += ( "/munin-cgi/munin-cgi-graph" => "/usr/lib/munin/cgi/munin-cgi-graph" ) + cgi.assign = ( "" => "" ) +} + +alias.url += ( "/munin/static" => "/etc/munin/static" ) +alias.url += ( "/munin" => "/var/cache/munin/www" ) + +mimetype.assign = ( + ".html" => "text/html", + ".txt" => "text/plain", + ".css" => "text/css", + ".js" => "application/x-javascript", + ".jpg" => "image/jpeg", + ".jpeg" => "image/jpeg", + ".gif" => "image/gif", + ".png" => "image/png", + "" => "application/octet-stream" + ) +EOF +cat > /etc/systemd/system/lighttpd-munin.service < /etc/netplan/50-cloud-init.yaml < /root/restic_backup.sh < /etc/incron.d/feh < /etc/incron.d/fim <