X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=distro-end;h=27cefeaed8aa5c32a7dda61791b3b09fce54b05e;hb=97b78b0003982c6374f4d631694ba2746580cf1f;hp=b1b7a9f30f2c69866fb2749e96b3878689c427b5;hpb=802e885e3e7fa3857f8bc4f54c261d5ca76f2454;p=distro-setup diff --git a/distro-end b/distro-end index b1b7a9f..27cefea 100755 --- a/distro-end +++ b/distro-end @@ -525,9 +525,13 @@ Pin-Priority: 500 EOF ;; nabia) + # note, to get the latest, it would be n=bullseye* + # but that has conflicting package versions, so this does the old one. + # I only use it for special rare purposes. Just keep in mind it is an + # outdated insecure version. sd /etc/apt/preferences.d/chromium-bullseye < /dev/null; then sudo useradd --create-home -d /var/lib/znc --system --shell /sbin/nologin --comment "Account to run ZNC daemon" --user-group znc fi @@ -1401,6 +1408,7 @@ tu /etc/schroot/desktop/fstab <<'EOF' /run/user/0 /run/user/0 none rw,bind 0 0 EOF +# todo: consider if this should use the new sysd-prom-fail sd /etc/systemd/system/schrootupdate.service <<'EOF' [Unit] Description=schrootupdate @@ -1548,23 +1556,30 @@ sudo chown -R debian-transmission:debian-transmission /var/lib/transmission-daem # # Changed the cache-size to 256 mb, reduces disk use. # It is a read & write cache. -sudo ruby </dev/null && \ + ! systemctl is-active transmission-daemon; then + tmp=$(mktemp) + command sudo ruby <$tmp require 'json' p = '/etc/transmission-daemon/settings.json' -File.write(p, JSON.pretty_generate(JSON.parse(File.read(p)).merge({ -'rpc-whitelist-enabled' => false, -'rpc-authentication-required' => false, -'incomplete-dir' => '$tdir/partial-torrents', -'incomplete-dir-enabled' => true, -'download-dir' => '$tdir/torrents', -"speed-limit-up" => 800, -"speed-limit-up-enabled" => true, -"peer-port" => 61486, -"cache-size-mb" => 256, -"ratio-limit" => 5.0, -"ratio-limit-enabled" => false, -})) + "\n") +s = { + 'rpc-whitelist-enabled' => false, + 'rpc-authentication-required' => false, + 'incomplete-dir' => '$tdir/partial-torrents', + 'incomplete-dir-enabled' => true, + 'download-dir' => '$tdir/torrents', + "speed-limit-up" => 800, + "speed-limit-up-enabled" => true, + "peer-port" => 61486, + "cache-size-mb" => 256, + "ratio-limit" => 5.0, + "ratio-limit-enabled" => false, +} +puts(JSON.pretty_generate(JSON.parse(File.read(p)).merge(s))) EOF + cat $tmp | sudo dd of=/etc/transmission-daemon/settings.json + +fi ####### end transmission @@ -1879,8 +1894,7 @@ esac case $HOSTNAME in kd) - # ive got these + a needed dependency pinned to bullseye, just to get - # versions more in line with the main docs. + /a/bin/buildscripts/prometheus # Font awesome is needed for the alertmanager ui. pi prometheus-alertmanager prometheus prometheus-node-exporter fonts-font-awesome web-conf -p 9091 -f 9090 - apache2 i.b8.nz <<'EOF' @@ -1893,6 +1907,18 @@ AuthUserFile "/etc/prometheus-htpasswd" Require valid-user EOF + + web-conf -p 9094 -f 9093 - apache2 i.b8.nz <<'EOF' + +AuthType Basic +AuthName "basic_auth" +# created with +# htpasswd -c prometheus-htpasswd USERNAME +AuthUserFile "/etc/prometheus-htpasswd" +Require valid-user + +EOF + # by default, the alertmanager web ui is not enabled other than a page # that suggests to use the amtool cli. that tool is good, but you cant # silence things nearly as fast. @@ -1935,8 +1961,7 @@ Require valid-user EOF # For work, i think we will just use the firewall for hosts in the main data center, and - # apache/nginx + tls + basic auth outside of it. or consider stunnel. - + # vpn for hosts outside it. # TODO: figure out how to detect the ping failure and try again.