various fixes and improvements
authorIan Kelling <iank@fsf.org>
Sat, 10 Feb 2018 04:46:19 +0000 (23:46 -0500)
committerIan Kelling <iank@fsf.org>
Sat, 10 Feb 2018 04:46:19 +0000 (23:46 -0500)
brc
distro-begin
distro-end
distro-pkgs [new file with mode: 0755]
mail-setup
pkgs
radicale-setup
subdir_files/.gnupg/gpg.conf

diff --git a/brc b/brc
index fbc1acb2f653cc50467d6aeb9f6ff036cfc32c7a..96e66a883d647c5e69538b53e96b704814f1f14a 100644 (file)
--- a/brc
+++ b/brc
@@ -951,6 +951,10 @@ else
     }
 fi
 
+ipdrop() {
+    s iptables -A INPUT -s $1 -j DROP
+}
+
 net-dev-info() {
     e "lspci -nnk|gr -iA2 net"
     lspci -nnk|gr -iA2 net
@@ -1527,7 +1531,7 @@ t() {
      declare -gi _seq; _seq+=1
      echo "test body" | m mail -s "test mail from $HOSTNAME, $_seq" "${@:-root@localhost}"
      # for testing to send from an external address, you can do for example
-     # -aFrom:ian@iank.bid web-6fnbs@mail-tester.com
+     # -fian@iank.bid -aFrom:ian@iank.bid web-6fnbs@mail-tester.com
      # note in exim, you can retry a deferred message
      # s exim -M MSG_ID
      # MSG_ID is in /var/log/exim4/mainlog, looks like 1ccdnD-0001nh-EN
index e77ff04a5827f1d7200b35718cb2205276613ad0..4c889b35eb523b4affc399c2d5941101c593215b 100755 (executable)
@@ -469,7 +469,7 @@ EOF
 fi
 
 ##### setup /nocow.
-# a nocow dir that is common to multiple distros installed onthe same system
+# a nocow dir that is common to multiple distros installed on the same system
 dir=/nocow
 if has_btrfs; then
     if ! mountpoint $dir; then
index 660d556ea2363d9220ab9859c09fc3d2b4403f97..9f06366c8f3a1b0efde3830d45ea2d2484a74df4 100755 (executable)
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+### setup
 errcatch
+src="${BASH_SOURCE%/*}"
+source $src/pkgs
 
 set -x
-
 exec &> >(sudo tee -a /var/log/distro-end)
 echo "$0: $(date): starting now)"
-
-src="${BASH_SOURCE%/*}"
-
-source $src/pkgs
-
 # see example of usage to understand.
 end_msg() {
     local y
     IFS= read -r -d '' y  ||:
     end_msg_var+="$y"
 }
-
 spa() { # simple package add
     simple_packages+=($@)
 }
-
 distro=$(distro-name)
-
 pending_reboot=false
 sed="sed --follow-symlinks"
-
 # template
 case $distro in
 esac
 
+#### initial packages
 pup
 if isdeb; then
     pi aptitude
 fi
 
-simple_packages=(${p3[@]})
-
-case $HOSTNAME in
-    lj|li) : ;;
-    *)
-        simple_packages+=(${p4[@]})
-        spa $(apt-cache search ruby[.0-9]+-doc| awk '{print $1}')
-        ;;
-esac
-
-
 ########### begin section including li ################
+pi ${p3[@]} $($src/distro-pkgs)
 
 conflink
 
 case $distro in
-    arch)
-        # ubuntu 14.04 uses b-cron,
-        # but its not maintained in arch.
-        # of the ones in the main repos, cronie is only one maintained.
-        # fcron appears abandoned software.
-        pi cronie
-        sgo cronie
-        ;;
-    *) : ;; # other distros come with cron.
+    arch) sgo cronie ;;
 esac
 
-
-
 case $distro in
-    *) pi at ;;&
     arch) sgo atd ;;
 esac
 
 
 case $distro in
-    debian|trisquel|ubuntu) pi curl;;
-    arch) : ;;
-    # fedora: unknown
-esac
-
-case $distro in
-    # tk for gitk
-    arch) spa git tk ;;
-    *) spa git ;;
-esac
-
-case $distro in
-    arch) spa the_silver_searcher ;;
-    debian|trisquel|ubuntu) spa silversearcher-ag ;;
-    # fedora unknown
-esac
-
-case $distro in
-    debian|trisquel|ubuntu) spa ntp;;
-    arch)
-        pi ntp
-        sgo ntpd
-        ;;
-    # others unknown
+    arch) sgo ntpd ;;
 esac
 
 
 # no equivalent in other distros:
 case $distro in
     debian|trisquel|ubuntu)
-        pi aptitude
         if ! dpkg -s apt-file &>/dev/null; then
             # this condition is just a speed optimization
             pi apt-file
             s apt-file update
         fi
-        # for debconf-get-selections
-        spa debconf-utils
         ;;
 esac
 
 
-case $distro in
-    arch|debian|trisquel|ubuntu)
-        spa bash-completion
-        ;;
-    # others unknown
-esac
-
-
-
-
-
 # disable motd junk.
 case $distro in
     debian)
@@ -169,14 +105,8 @@ if isdebian; then
     setup-debian-auto-update
 fi
 
-# we've got a few dependencies later on, so install them now.
-pi eatmydata; PI_PREFIX=eatmydata
-pi "${simple_packages[@]}"
-simple_packages=()
-
 
 ### begin docker install ####
-
 if isdeb; then
     # https://store.docker.com/editions/community/docker-ce-server-debian?tab=description
     pi  software-properties-common apt-transport-https
@@ -249,7 +179,6 @@ esac
 # website setup
 case $HOSTNAME in
     lj|li)
-
         case $HOSTNAME in
             lj) domain=iank.bid; exit 0 ;;
             li) domain=iankelling.org ;;
@@ -622,28 +551,11 @@ EOF
         ;;
 esac
 
-
-# needed for checkrestart
-if isdeb; then
-    spa debian-goodies
-fi
-
-
-
 ########### end section including li/lj ###############
 
-case $distro in
-    debian) spa gnome-session-flashback ;;
-    # flidas is missing dependency gnome-panel. others unknown
-esac
-
+pi ${p4[@]} $(apt-cache search ruby[.0-9]+-doc| awk '{print $1}')
 
 
-case $distro in
-    trisquel|ubuntu|debian) spa ack-grep ;;
-    arch|fedora) spa ack ;;
-    # fedora unknown
-esac
 
 
 
@@ -661,20 +573,6 @@ EOF
         ;;
 esac
 
-case $distro in
-    debian)
-        spa cpio-doc ;;
-    # not packaged in flidas. others unknown. gfdl nonfree issue
-esac
-
-
-
-
-case $distro in
-    fedora) spa unrar ;;
-    *) spa unrar-free ;;
-esac
-
 
 ### begin home vpn server setup
 
@@ -717,6 +615,7 @@ fi
 
 if [[ $HOSTNAME == tp ]]; then
 
+    ##### rss2email
     # note, see bashrc for more documentation.
     pi rss2email
     s dd of=/etc/systemd/system/rss2email.service <<'EOF'
@@ -749,6 +648,7 @@ EOF
     sgo rss2email.timer
 fi
 
+
 ######### begin  pump.io periodic backup #############
 if [[ $HOSTNAME == frodo ]]; then
     s dd of=/etc/systemd/system/pumpbackup.service <<'EOF'
@@ -776,6 +676,7 @@ EOF
 fi
 #########  end  pump.io periodic backup #############
 
+
 case $distro in
     debian|trisquel|ubuntu)
         # suggests because we want the resolvconf package. however, i install it earlier
@@ -802,9 +703,8 @@ lnf /a/opt/.AndroidStudio2.2 ~
 spa lib32stdc++6 default-jdk
 
 
+############# begin syncthing setup ###########
 if [[ $HOSTNAME == frodo ]]; then
-    ############# begin syncthing setup ###########
-
     # It\'s simpler to just worry about running it in one place for now.
     # I assume it would work to clone it\'s config to another non-phone
     # and just run it in one place instead of the normal having a
@@ -876,20 +776,11 @@ if [[ $HOSTNAME == frodo ]]; then
     # Note, the other thing i did was port forward port 22000,
     # per https://docs.syncthing.net/users/firewall.html
 
-    #############  end syncthing setup ###########
 fi
+#############  end syncthing setup ###########
 
 
 
-# no equivalent in other distros:
-case $distro in
-    debian|trisquel|ubuntu)
-        # for gui bug reporting
-        spa python-vte
-        ;;
-esac
-
-
 ####### begin misc packages ###########
 
 reset-sakura
@@ -1251,6 +1142,7 @@ EOF
 EOF
     done
 fi
+######### end transmission client setup ######
 
 # dunno why it\'s there, but get rid of it
 case $HOSTNAME in
@@ -1258,7 +1150,7 @@ case $HOSTNAME in
 esac
 
 
-# printer
+### printer setup
 case $distro in
     arch)
         pi cups ghostscript gsfonts # from arch wiki cups page
@@ -1281,66 +1173,7 @@ case $distro in
     trisquel|ubuntu|debian) pi --no-install-recommends mairix notmuch ;;
     fedora|arch) spa mairix notmuch ;;
 esac
-case $distro in
-    arch) spa nfs-utils ;;
-    trisquel|ubuntu|debian) spa nfs-client ;;
-esac
-case $distro in
-    trisquel|ubuntu|debian) spa par2 ;;
-    arch|fedora) spa par2cmdline ;;
-esac
-
-# needed for my tex resume
-case $distro in
-    trisquel|ubuntu|debian) spa texlive-full ;;
-    arch) spa texlive-most ;;
-    # fedora unknown
-esac
-
-
-case $distro in
-    # optional dep for firefox for h.264 video
-    arch) spa gst-libav ;;
-    # other distros, probably come by default
-esac
 
-case $distro in
-    fedora|trisquel|ubuntu|debian) spa gnupg-agent ;;
-    arch) : ;;
-esac
-
-
-case $distro in
-    fedora) spa pinentry-gtk ;;
-    *) : ;; # comes default or with other packages
-esac
-
-case $distro in
-    arch) spa firefox pulseaudio;;
-    trisquel) spa abrowser ;;
-    *) : ;; # comes default or with other packages, or uknown
-esac
-
-
-case $distro in
-    arch) spa ttf-dejavu;;
-    debian|trisquel|ubuntu) spa fonts-dejavu ;;
-    # others unknown
-esac
-
-
-case $distro in
-    arch) spa xorg-xev;;
-    debian|trisquel|ubuntu) spa x11-utils ;;
-    # others unknown
-esac
-
-case $distro in
-    arch) pi virt-install;;&
-    debian|trisquel|ubuntu) pi virtinst ;;&
-    *) pi virt-manager ;; # creates the libvirt group in debian at least
-    # others unknown
-esac
 # allow user to run vms, from debian handbook
 for x in iank traci; do s usermod -a -G libvirt,kvm $x; done
 # bridge networking as user fails. google lead here, but it doesn\'t work:
@@ -1354,39 +1187,17 @@ for x in iank traci; do s usermod -a -G libvirt,kvm $x; done
 # #s chown root:qemu $f # debian has somethig like qemu-libvirt. equivalent?
 # s chmod 640 $f
 
-
-case $distro in
-    arch) spa cdrkit;;
-    debian|trisquel|ubuntu) spa genisoimage;;
-    # others unknown
-esac
-
-case $distro in
-    arch) spa spice-gtk3 ;;
-    debian|trisquel|ubuntu) spa spice-client-gtk;;
-    # others unknown
-esac
-
 # general known for debian/ubuntu, not for fedora
 
 case $distro in
     debian|trisquel|ubuntu)
-        pi golang-go
         # a bit of googling, and added settings to bashrc
         go get -u github.com/mvdan/fdroidcl/cmd/fdroidcl
         ;;
-    # others unknown
 esac
 
-
 case $distro in
     arch)
-        # cdrkit for cloud-init isos
-        # dnsmasq & ebtables for nat networking in libvirt
-        # qemu for qemu-img, bind-tools for dig
-        # dmidecode just because syslog complains
-        pi unzip xorg-xmodmap dmidecode ebtables\
-           bridge-utils dnsmasq qemu bind-tools
         # 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
@@ -1397,41 +1208,9 @@ case $distro in
         # guessing this is not needed
         #sgo virtlogd.service
         sgo libvirtd
-
         ;;
 esac
 
-case $distro in
-    arch) pi virtviewer ;;
-    *) : ;; # other distros have it as a dependency afaik.
-esac
-
-
-
-case $distro in
-    fedora) cabal install shellcheck ;;
-    *) spa shellcheck ;;
-    # unknown for older ubuntu
-esac
-
-
-case $distro in
-    arch|debian|trisquel|ubuntu) spa pumpa ;;
-    # others unknown. do have a buildscript:
-    # /a/bin/buildscripts/pumpa ;;
-esac
-
-
-case $distro in
-    debian) pi adb ;;
-    debian|trisquel|ubuntu) spa android-tools-adbd ;;
-    # todo: not sure this is needed anymore, or if trisqel etc works even
-    #    debian) spa android-tools-adbd/unstable ;;
-    arch) spa android-tools ;;
-    # other distros unknown
-esac
-
-
 
 case $distro in
     fedora)
@@ -1457,28 +1236,6 @@ case $distro in
 esac
 
 
-case $distro in
-    debian)
-        pi task-mate-desktop
-        # in settings, change scrolling to two-finger,
-        # because the default edge scroll doesn\'t work.
-        pu transmission-gtk
-        ;;
-    trisquel)
-        # mate-indicator-applet and beyond are msc things I noticed diffing a
-        # standard install with mine.
-        pi xorg lightdm mate-desktop-environment mate-desktop-environment-extras mate-indicator-applet anacron
-        ;;
-    # others unknown
-esac
-
-case $distro in
-    arch) spa apg  ;;
-    # already in debian
-esac
-
-
-
 
 
 # note this failed running at the beginning of this file,
@@ -1717,7 +1474,6 @@ esac
 # esac
 cd /a/opt/btrbk
 s make install
-spa pv # for progress bar when running interactively.
 
 # ian: temporarily disabled while hosts are in flux.
 # if [[ $HOSTNAME == tp ]]; then
@@ -1728,20 +1484,29 @@ spa pv # for progress bar when running interactively.
 # fi
 
 
+end_msg <<'EOF'
+In mate settings settings, change scrolling to two-finger,
+because the default edge scroll doesn\'t work. Originally found this in debian.
+EOF
+
+case $distro in
+    debian)
+        # remove dep that came in with desktop
+        pu transmission-gtk
+        ;;
+    esac
 
 
 case $distro in
     debian|trisquel|ubuntu) s gpasswd -a iank adm ;; #needed for reading logs
 esac
 
-# tor
+#### tor
 case $distro in
     # based on
     # https://www.torproject.org/docs/rpms.html.en
     # https://www.torproject.org/docs/debian.html.en
     # todo: figure out if the running service needs to be restarted upon updates
-
-
     # todo on fedora: setup non-dev packages
     fedora)
         s dd of=/etc/yum.repos.d/torproject.repo <<'EOF'
@@ -1839,12 +1604,7 @@ fi
 e "$end_msg_var"
 
 
-# persistent virtual machines
-case $distro in
-    debian|trisquel|ubuntu)
-        pi libosinfo-bin;
-        ;;
-esac
+
 # if I was going to create a persistent vm, i might do it like this:
 # variant=something  # from: virt-install --os-variant list
 # s virt-install --noautoconsole --graphics spice,listen=0.0.0.0 \
@@ -1856,17 +1616,6 @@ esac
 ######### begin stuff belonging at the end    ##########
 
 
-case $distro in
-    ubuntu|debian)
-        spa spacefm-gtk3 ;;
-    arch)
-        spa spacefm ;;
-esac
-
-
-pi "${simple_packages[@]}"
-
-
 if $pending_reboot; then
     echo "$0: pending reboot and then finished. doing it now."
     s reboot now
diff --git a/distro-pkgs b/distro-pkgs
new file mode 100755 (executable)
index 0000000..0c137cb
--- /dev/null
@@ -0,0 +1,262 @@
+#!/bin/bash -l
+
+errcatch
+
+
+usage() {
+    cat <<EOF
+Usage: ${0##*/} [DISTRO_NAME]
+Print packages to install for each distro.
+Default DISTRO_NAME is the one currently running.
+
+
+-h|--help  Print help and exit.
+
+Note: Uses GNU getopt options parsing style
+EOF
+    exit $1
+}
+
+if [[ $1 ]]; then
+    distro=$1
+else
+    distro=$(distro-name)
+fi
+
+isdeb() {
+    case $distro in
+        debian|trisquel|ubuntu)
+            return 0
+            ;;
+    esac
+    return 1
+}
+
+bool_opt=false # default
+long_opt=foo # default
+temp=$(getopt -l help,long-opt: hso: "$@") || usage 1
+eval set -- "$temp"
+while true; do
+    case $1 in
+        -s) bool_opt=true; shift ;;
+        -o|--long-opt) long_opt="$2"; shift 2 ;;
+        -h|--help) usage ;;
+        --) shift; break ;;
+        *) echo "$0: Internal error! unexpected args: $*" ; exit 1 ;;
+    esac
+done
+
+
+case $distro in
+    arch)
+        # ubuntu 14.04 uses b-cron,
+        # but its not maintained in arch.
+        # of the ones in the main repos, cronie is only one maintained.
+        # fcron appears abandoned software.
+        e cronie
+        ;;
+    *) : ;; # other distros come with cron.
+esac
+
+case $distro in
+    arch) e tk ;;
+    *) : ;; # other distros come with tk from git
+esac
+
+case $distro in
+    arch) e the_silver_searcher ;;
+    debian|trisquel|ubuntu) e silversearcher-ag ;;
+    # fedora unknown
+esac
+
+if isdeb; then
+    # for debconf-get-selections
+    e debconf-utils
+fi
+
+# needed for checkrestart
+if isdeb; then
+    e debian-goodies
+fi
+
+###### quit now for li/lj
+case $HOSTNAME in
+    lj|li)
+        exit 0
+        ;;
+esac
+
+case $distro in
+    debian) e gnome-session-flashback ;;
+    # flidas is missing dependency gnome-panel. others unknown
+esac
+
+case $distro in
+    trisquel|ubuntu|debian) e ack-grep ;;
+    arch|fedora) e ack ;;
+    # fedora unknown
+esac
+
+case $distro in
+    debian)
+        e cpio-doc ;;
+    # not packaged in flidas. in ubuntu it is in multiverse
+esac
+
+case $distro in
+    fedora) e unrar ;;
+    *) e unrar-free ;;
+esac
+
+case $distro in
+    debian|trisquel|ubuntu)
+        # for gui bug reporting
+        e python-vte
+        ;;
+    # no equivalent in other distros:
+esac
+
+case $distro in
+    arch) e nfs-utils ;;
+    trisquel|ubuntu|debian) e nfs-client ;;
+esac
+
+case $distro in
+    trisquel|ubuntu|debian) e par2 ;;
+    arch|fedora) e par2cmdline ;;
+esac
+
+# needed for my tex resume
+case $distro in
+    trisquel|ubuntu|debian) e texlive-full ;;
+    arch) e texlive-most ;;
+    # fedora unknown
+esac
+
+case $distro in
+    # optional dep for firefox for h.264 video
+    arch) e gst-libav ;;
+    # other distros, probably come by default
+esac
+
+case $distro in
+    fedora|trisquel|ubuntu|debian) e gnupg-agent ;;
+    arch) : ;;
+esac
+
+
+case $distro in
+    fedora) e pinentry-gtk ;;
+    *) : ;; # comes default or with other packages
+esac
+
+case $distro in
+    arch) e firefox pulseaudio;;
+    trisquel) e abrowser ;;
+    *) : ;; # comes default or with other packages, or uknown
+esac
+
+
+case $distro in
+    arch) e ttf-dejavu;;
+    debian|trisquel|ubuntu) e fonts-dejavu ;;
+    # others unknown
+esac
+
+
+case $distro in
+    arch) e xorg-xev;;
+    debian|trisquel|ubuntu) e x11-utils ;;
+    # others unknown
+esac
+
+case $distro in
+    arch) e virt-install;;&
+    debian|trisquel|ubuntu) e virtinst ;;&
+    *) e virt-manager ;; # creates the libvirt group in debian at least
+    # others unknown
+esac
+
+
+
+case $distro in
+    arch) e cdrkit;;
+    debian|trisquel|ubuntu) e genisoimage;;
+    # others unknown
+esac
+
+case $distro in
+    arch) e spice-gtk3 ;;
+    debian|trisquel|ubuntu) e spice-client-gtk;;
+    # others unknown
+esac
+
+case $distro in
+    debian|trisquel|ubuntu)
+        # fdroidcl dependency
+        e golang-go
+        ;;
+    # others unknown
+esac
+
+
+### stuff brought in through deps in other distros
+case $distro in
+    arch)
+        # for nat networking in libvirt
+        e ebtables
+        # dmidecode just because syslog complains
+        e dmidecode
+        e unzip xorg-xmodmap bridge-utils qemu virtviewer apg
+        # for dig
+        e bind-tools
+        ;;
+esac
+
+case $distro in
+    fedora) cabal install shellcheck ;;
+    *) e shellcheck ;;
+    # unknown for older ubuntu
+esac
+
+case $distro in
+    arch|debian|trisquel|ubuntu) e pumpa ;;
+    # others unknown. do have a buildscript:
+    # /a/bin/buildscripts/pumpa ;;
+esac
+
+case $distro in
+    debian) e adb ;;
+    debian|trisquel|ubuntu) e android-tools-adbd ;;
+    # todo: not sure this is needed anymore, or if trisqel etc works even
+    #    debian) e android-tools-adbd/unstable ;;
+    arch) e android-tools ;;
+    # other distros unknown
+esac
+
+#### desktopy stuff
+case $distro in
+    debian)
+        e task-mate-desktop
+        ;;
+    trisquel)
+        # mate-indicator-applet and beyond are msc things I noticed diffing a
+        # standard install with mine.
+        e xorg lightdm mate-desktop-environment mate-desktop-environment-extras mate-indicator-applet anacron
+        ;;
+    # others unknown
+esac
+
+case $distro in
+    debian|trisquel|ubuntu)
+        e libosinfo-bin;
+        ;;
+    # others unknown
+esac
+
+case $distro in
+    ubuntu|debian)
+        e spacefm-gtk3 ;;
+    arch)
+        e spacefm ;;
+esac
index fdb4c219d4eb2b9154c500c93fe6d751fe962113..b02da1ea52efaec1099e71c47d903269f47b815e 100755 (executable)
@@ -28,12 +28,14 @@ Setup exim4 / postfix / dovecot
 The minimal assumption we have is that /etc/mailpass exists
 
 
-I\'ve had problems with postfix on debian:
+I've had problems with postfix on debian:
 on stretch, a startup ordering issue caused all mail to fail.
 postfix changed defaults to only use ipv6 dns, causing all my mail to fail.
-I haven\'t gotten around to getting a non-debian exim
+I haven't gotten around to getting a non-debian exim
 setup.
 
+
+
 -h|--help  Print help and exit.
 EOF
     exit $1
@@ -289,8 +291,9 @@ else # begin exim. has debian specific stuff for now
 
     if [[ -e /p/c/filesystem ]]; then
         # to put the hostname in the known hosts
-        ssh -o StrictHostKeyChecking=no root@li.iankelling.org :
-        /a/exe/vpn-mk-client-cert -b mail -n mail li.iankelling.org
+        :
+        #ssh -o StrictHostKeyChecking=no root@li.iankelling.org :
+        #/a/exe/vpn-mk-client-cert -b mail -n mail li.iankelling.org
     fi
 
     cat >/etc/systemd/system/mailroute.service <<EOF
@@ -413,7 +416,7 @@ OnCalendar=daily
 WantedBy=timers.target
 EOF
     systemctl daemon-reload
-    systemctl start mailcert
+    #systemctl start mailcert
     systemctl restart mailcert.timer
     systemctl enable mailcert.timer
 
@@ -891,6 +894,9 @@ EOF
     done
     # end setup passwd.client
 
+    # by default, only 10 days of logs are kept. increase that.
+    sed -ri 's/^(\s*rotate\s).*/\11000/' /etc/logrotate.d/exim4-base
+
     systemctl restart exim4
 
 fi  #### end if exim4
diff --git a/pkgs b/pkgs
index 1c1ce85cfe2db474e7f9ab0182067b6c566ad9c7..40894720922645ce7d0568cde7deefc642b9f399 100644 (file)
--- a/pkgs
+++ b/pkgs
@@ -1,5 +1,7 @@
 #!/bin/bash
 # meant to be sourced
+#
+# packages with the same name across distros.
 
 p1=(
     trash-cli
@@ -15,10 +17,16 @@ p2=(
     dmenu
 )
 p3=(
+    at
+    bash-completion
+    curl
+    eatmydata
+    git
     htop
     iptables
     mailutils
     nmon
+    ntp
     rdiff-backup
     ruby
     ruby-rest-client
@@ -34,12 +42,14 @@ p3=(
 # pidgin-otr, i went into pidgin pluggin settings and generated a key for some accounts
 # xawtv has webcam cli control. v4lctl bright 80%; v4lctl list
 # guvcview also adjusts webcam
+# pv is used by btrbk
 p4=(
     adb
     apache2
     apache2-doc
     apt-doc
     apt-listchanges
+    apt-rdepends
     aptitude-doc-en
     bash-doc
     beets
@@ -87,7 +97,6 @@ p4=(
     libreoffice
     linphone
     linux-doc
-    locate
     lshw
     make-doc
     manpages
@@ -114,6 +123,7 @@ p4=(
     pidgin
     pidgin-otr
     pry
+    pv
     python-autopep8
     python3-doc
     qrencode
@@ -138,3 +148,5 @@ p4=(
     xscreensaver-gl
     xscreensaver-gl-extra
 )
+
+pall=(${p1[@]} ${p2[@]} ${p3[@]} ${p4[@]} )
index aed914b1c3eb2f635891ef0a6e616c8db4d3a5db..929a14fc27caabd205da810f80bfff259bf48dfa 100755 (executable)
@@ -1,5 +1,5 @@
 #!/bin/bash -l
-
+set -x
 [[ $EUID == 0 ]] || exec sudo -E "$BASH_SOURCE" "$@"
 
 
@@ -40,6 +40,19 @@ ser daemon-reload # not sure this is needed
 
 pi-nostart radicale
 
+# use persistent uid/gid
+IFS=:; read _ _ uid _ < <(getent passwd radicale ); unset IFS
+IFS=:; read _ _ gid _ < <(getent group radicale ); unset IFS
+if [[ $uid != 609 ]]; then
+    systemctl stop radicale ||:
+    usermod -u 609 radicale
+    groupmod -g 609 radicale
+    usermod -g 609 radicale
+fi
+find /o/radicale /var/log/radicale -xdev -exec chown -h 609 {} +
+find /o/radicale -xdev -exec chgrp -h 609 {} +
+
+
 # I moved /var/lib/radicale after it's initialization.
 # I did a sudo -u radicale git init in the collections subfolder
 # after it gets created, per the git docs.
index f9da1b58f50f80ea44ee0a55e4e2040ce7de7df4..3ddb9ff196f5ce82e0ec2e8f183f3adfe863a89d 100644 (file)
@@ -6,6 +6,7 @@ keyserver-options auto-key-retrieve
 # start gpg agent on login
 use-agent
 
+
 # standard short key ids are easy to collide
 # https://security.stackexchange.com/questions/84280/short-openpgp-key-ids-are-insecure-how-to-configure-gnupg-to-use-long-key-ids-i
 # https://evil32.com/