X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=distro-end;h=64441d1cfc9d477847610a3158b8b72ac2f6a438;hb=3c86472e219aaf3c97b1f878b4a818644b282aba;hp=655ae7f4c19d68bf6f4aa1cb6c9ea25997f03b3b;hpb=0b6d44c7f3d567e0a26138509c8a24cb57c69b50;p=distro-setup diff --git a/distro-end b/distro-end index 655ae7f..64441d1 100755 --- a/distro-end +++ b/distro-end @@ -114,7 +114,7 @@ if isdeb; then l="deb [arch=amd64] $url $(debian-codename-compat) stable" if ! grep -xFq "$l" /etc/apt/sources.list{,.d/*.list}; then - sudo add-apt-repository $l + sudo add-apt-repository "$l" p update fi # docker eats up a fair amount of cpu when doing nothing, so don't enable it unless @@ -131,6 +131,7 @@ fi ### end docker install #### + ### begin certbot install ### case $distro in debian) @@ -180,6 +181,22 @@ sgo certbotmail.timer pi ${p1[@]} + +## prometheus node exporter setup +web-conf -f 9100 -p 9101 apache2 $(hostname -f) <<'EOF' +#https://httpd.apache.org/docs/2.4/mod/mod_authn_core.html#authtype +# https://stackoverflow.com/questions/5011102/apache-reverse-proxy-with-basic-authentication + + AllowOverride None + AuthType basic + AuthName "Authentication Required" + # setup one time, with root:www-data, 640 + AuthUserFile "/etc/prometheus-htpasswd" + Require valid-user + +EOF + + # website setup case $HOSTNAME in lj|li) @@ -604,8 +621,8 @@ deb [arch=amd64] https://downloads.iridiumbrowser.de/deb/ stable main EOF f=/etc/apt/sources.list.d/iridium-browser.list if ! diff -q $t $f; then - cp $t $f - chmod 644 $f + s cp $t $f + s chmod 644 $f p update fi pi iridium-browser @@ -970,8 +987,8 @@ deb http://us.archive.ubuntu.com/ubuntu/ bionic-security main EOF f=/etc/apt/sources.list.d/bionic.list if ! diff -q $t $f; then - cp $t $f - chmod 644 $f + s cp $t $f + s chmod 644 $f p update fi @@ -1089,9 +1106,9 @@ esac # 450 seems likely to be unused. we need to specify one or else # it won't be stable across installs. if ! getent passwd debian-transmission > /dev/null; then + s groupadd -g 450 debian-transmission case $distro in arch) - s groupadd -g 450 debian-transmission s useradd \ --system \ --create-home \ @@ -1106,7 +1123,6 @@ if ! getent passwd debian-transmission > /dev/null; then --gid 450 \ --uid 450 \ --system \ - --group \ --no-create-home \ --disabled-password \ --home /var/lib/transmission-daemon \ @@ -1339,7 +1355,7 @@ case $distro in # just the latest stable at the time of writing # TODO, maybe put this all into a build script, # and do some automatic updates - wget https://dl.google.com/go/go1.12.4.linux-amd64.tar.gz + wget -q https://dl.google.com/go/go1.12.4.linux-amd64.tar.gz s tar -C /usr/local -xzf go1.12.4.linux-amd64.tar.gz rm -f * fi @@ -1350,17 +1366,24 @@ esac case $distro in arch) + pi virt-install # otherwise we get error about accessing kvm module. # seems like there might be a better way, but google was a bit vague. s $sed -ri '/^ *user *=/d' /etc/libvirt/qemu.conf echo 'user = "root"' | s tee -a /etc/libvirt/qemu.conf - # https://bbs.archlinux.org/viewtopic.php?id=206206 - # # this should prolly go in the wiki - sgo virtlogd.socket # guessing this is not needed #sgo virtlogd.service - sgo libvirtd + + # iank: disabed as im not using libvirt usually + # # https://bbs.archlinux.org/viewtopic.php?id=206206 + # # # this should prolly go in the wiki + # sgo virtlogd.socket + # sgo libvirtd + ;; + debian|trisquel|ubuntu) + pi-nostart virtinst virt-manager ;; + esac @@ -1566,6 +1589,9 @@ s fc-cache /a/bin/distro-setup/mymimes +sgo dynamicipupdate + + # stop autopoping windows when i plug in an android phone. # dbus-launch makes this work within an ssh connection, otherwise you get this message, # with still 0 exit code.