fi
done
}
-sre () {
+sre() {
for service; do
m systemctl restart $service
m systemctl enable $service;
# * mail vpn config
-vpnser=mailvpn.service
+# old.
+#vpnser=mailvpn.service
vpnser=wg-quick@wgmail.service
case $HOSTNAME in
$MAIL_HOST)
+ rsync -aiSAX --chown=root:root --chmod=g-s /p/c/filesystem/etc/wireguard/ /etc/wireguard
bindpaths="/etc/127.0.0.1-resolv:/run/systemd/resolve /etc/basic-nsswitch:/etc/resolved-nsswitch:norbind"
;;&
bk)
echo|i /etc/exim4/conf.d/router/190_exim4-config_fsfsmarthost
echo|i /etc/exim4/conf.d/rcpt_local_acl
echo|i /etc/exim4/conf.d/router/890_backup_copy
+ echo|i /etc/exim4/conf.d/main/000_local-nn
if $bhost_t; then
;;&
$MAIL_HOST|bk)
sstart mailnn mailnnroute
- # If these have changes, id rather manually restart it, id rather
- # not restart and cause temporary errors
- if $reload; then
- sre $vpnser
- else
- sstart $vpnser
- fi
;;&
$MAIL_HOST)
+ # we use dns to start wg
if $reload; then
sre unbound
else
fi
;;&
$MAIL_HOST|bk)
+ # If these have changes, id rather manually restart it, id rather
+ # not restart and cause temporary errors
+ if $reload; then
+ sre $vpnser
+ else
+ sstart $vpnser
+ fi
if ! systemctl is-active clamav-daemon >/dev/null; then
sstart clamav-daemon
# note, this will cause paniclog entries because it takes like 45
# Multiple user names need to be separated by spaces.
# Root and postmaster mail recipient:
-# duplicated in brc2
-bum() {
- local cur host
- host=$1
- (( $# == 1 )) || return 1
- cur="$(awk '$2 == "/bu/mnt" {print $1}' /proc/mounts)"
- if [[ $cur ]]; then
- if [[ $cur == "$host:/bu/md" ]]; then
- return 0
- else
- fusermount -u /bu/mnt
- fi
- fi
- m sshfs bu@$host:/bu/home/md /bu/mnt -o reconnect,ServerAliveInterval=20,ServerAliveCountMax=30 -o allow_other
-}
-bu() {
- if mountpoint -q /bu/mnt; then
- if ! timeout -s 9 10 fusermount -u /bu/mnt; then
- fusermount -zu /bu/mnt
- fi
- fi
-}
-
-case $HOSTNAME in
- $MAIL_HOST)
- case $HOSTNAME in
- kw) bum x3 ;;
- x3) bum kw ;;
- kd|sy) bum x2 ;;
- x2) bum kd ;;
- esac
- ;;
- *)
- bu
- ;;
-esac
-
-
m exit 0
: