for ncdir in /var/www/ncexpertpath /var/www/ncninja; do
ssh root@$host sudo -u www-data php $ncdir/occ -q maintenance:mode --on ||: # might not be running
rsync -ra /p/bkbackup/$ncbase/ root@$host:$ncdir || ret=$?
+ # https://docs.nextcloud.com/server/20/admin_manual/configuration_server/occ_command.html#maintenance-commands-label
+ ssh root@$host sudo -u www-data php $ncdir/occ -q maintenance:data-fingerprint
+ ssh root@$host sudo -u www-data php $ncdir/occ -q maintenance:mode --on
done
- rsync -ravi /p/bkbackup/rc/ root@$host:/m/rc
+ rsync -ravi /p/bkbackup/m root@$host:/
exit 0
fi
ret=1
fi
done
- rsync -rai --delete root@$host:/m/rc /p/bkbackup
+ rsync -rai --delete root@$host:/m /p/bkbackup
fi
exit $ret
fi
hr
echo /etc/nsswitch.conf:
- grep '^ *files' /etc/nsswitch.conf
+ grep '^ *hosts:' /etc/nsswitch.conf
if systemctl is-enabled systemd-resolved &>/dev/null || [[ $(systemctl is-active systemd-resolved ||:) != inactive ]]; then
hr; m ser status systemd-resolved | cat || :
hr; m systemd-resolve --status | cat
}
r2e() { command r2e -d /p/c/rss2email.json -c /p/c/rss2email.cfg "$@"; }
-if type -P rg &>/dev/null; then
- rg() { command rg -i -M 200 "$@"; }
- complete -r rg
-else
- alias rg=grr
-fi
-
rspicy() { # usage: HOST DOMAIN
# connect to spice vm remote host. use vspicy for local host
local port
path-add --end $HOME/.cargo/bin
+if type -P rg &>/dev/null; then
+ rg() { command rg -i -M 200 "$@"; }
+ complete -r rg
+else
+ alias rg=grr
+fi
+
+
+
# taken from default changes to bashrc and bash_profile
path-add --end --ifexists $HOME/.rvm/bin
# also had ruby bin dir, but moved that to environment.sh
#!/bin/bash
-
-# todo: figure out
-
# * intro
# Copyright (C) 2019 Ian Kelling
# SPDX-License-Identifier: AGPL-3.0-or-later
+# todo: notification of updates for nextcloud.
+# this should do it:
+# if ! timeout 10 sudo -u www-data php /var/www/ncninja/updater/updater.phar
+
+# todo setup better backup/sync of MAIL_HOST emails
+
+# todo: reinstall bk with bigger filesystem
+
+# fix so i dont have to do this every reboot:
+# /a/f/ans A D PANIC! $ s mkdir /var/run/clamav
+#
+#/a/f/ans A D PANIC! $ s chown clamav /var/run/clamav
+
# todo: monitor for msft unblock, and then remove on bk:
# /etc/exim4/conf.d/router/190_msft
# dnslookup_msft
# in 2 or 3 days or something. todo, test cron mail on li.
# todo: look at mailinabox extra dns records, note these changelogs:
-# * An MTA-STS policy for incoming mail is now published (in DNS and over HTTPS) when the primary hostname and email address domain both have a signed TLS certificate installed, allowing senders to know that an encrypted connection should be enforced.
-# * The per-IP connection limit to the IMAP server has been doubled to allow more devices to connect at once, especially with multiple users behind a NAT.
+# - An MTA-STS policy for incoming mail is now published (in DNS and over HTTPS) when the primary hostname and email address domain both have a signed TLS certificate installed, allowing senders to know that an encrypted connection should be enforced.
+# - The per-IP connection limit to the IMAP server has been doubled to allow more devices to connect at once, especially with multiple users behind a NAT.
#
# todo: mailtest-check failure on remote hosts is not going to alert me.
m mkdir -p $rclogdir
m chmod 750 $rclogdir
m chown www-data:adm $rclogdir
- # todo rss subscribe to carddav plugin
+ # note: subscribed to updates:
+ # r2e add rcmcarddav https://github.com/blind-coder/rcmcarddav/commits/master.atom ian@iankelling.org
+ # r2e add roundcube https://github.com/roundcube/roundcubemail/releases.atom ian@iankelling.org
m mkdir -p $rctmpdir /m/rc
m chown -R www-data.www-data $rctmpdir /m/rc
m chmod 750 $rctmpdir
echo '#!/bin/bash' >/usr/local/bin/send-test-forward
for test_from in ${test_froms[@]}; do
cat >>/usr/local/bin/send-test-forward <<EOFOUTER
-#!/bin/bash
/usr/sbin/exim -f $test_from -t <<EOF
From: $test_from
To: $test_to
if $slow; then
find $folder/new $folder/cur -type f -mmin +300 -delete
- if [[ ! $spamdpid ]]; then
- spamdpid=$(systemctl status spamassassin| sed -n '/^ *Main PID:/s/[^0-9]//gp')
+ if [[ ! $nspid ]]; then
+ nspid=$(systemctl status mailnn| sed -n '/^ *Main PID:/s/[^0-9]//gp')
fi
- if [[ $spamdpid ]]; then
- if [[ $(readlink /proc/$$/ns/net) != "$(readlink /proc/$spamdpid/ns/net)" ]]; then
- spamcpre="nsenter -t $spamdpid -n -m"
+ if [[ $nspid ]]; then
+ if [[ $(readlink /proc/$$/ns/net) != "$(readlink /proc/$nspid/ns/net)" ]]; then
+ spamcpre="nsenter -t $nspid -n -m"
fi
declare -A results
printf "missing %s" "${missing[*]}"
fi
echo
+ echo mailtest-check: cat $folder/$latest:
cat $folder/$latest
+ echo mailtest-check: end of cat
fi
else
echo $HOSTNAME mailtest spamd pid not found