# note q is owned by root:1000
# note p/m is owned 1000:1000 and chmod 700
mountpoints=(/a)
-private_mountpoints=(/q /m)
+private_mountpoints=(/q)
rsync_mountpoint=/q
conf_only=false
dry_run=false # mostly for testing
resume_arg=
do_i=true
+do_o=true
-temp=$(getopt -l help hcinprt: "$@") || usage 1
+temp=$(getopt -l help hcinoprt: "$@") || usage 1
eval set -- "$temp"
while true; do
case $1 in
-c) conf_only=true; shift ;;
-i) do_i=false; shift ;;
-n) dry_run=true; dry_run_arg=-n; shift ;;
+ -o) do_o=false; shift ;;
-p) progress_arg="--progress"; shift ;;
# btrbk arg: Resume only. Skips snapshot creation.
-r) resume_arg=-r; shift ;;
*) echo "$0: Internal error!" ; exit 1 ;;
esac
done
-read primary <<<"$@"
+
+if $do_o; then
+ private_mountpoints+=(/o)
+fi
+read primary <<<"$@" # not yet used
##### end command line parsing ########
if [[ $HOSTNAME == treetowl ]]; then
# note, this will need to be changed when the mail/contacts host changes
sgo openvpn-client@mail
- /a/bin/distro-setup/radicale-setup.sh
+ /a/bin/distro-setup/radicale-setup
fi
## android studio setup
pi syncthing
;;
esac
+ lnf -T /w/syncthing /home/ian/.config/syncthing
sgo syncthing@ian # runs as ian
# these things persist in ~/.config/syncthing, which I save in
- # /p/c/machine_specific
+ # /w/syncthing (not in /p, because syncthing should continue to
+ # run on home server even when using laptop as primary device)
# open http://localhost:8384/
# change listen address from default to tcp://:22001,
# this is because we do port forward so it doesn\'t have to use
# it contains runtime data,
# plus a simple symlink to the config file which it's
# not worth separating out.
- s lnf -T /q/transmission-daemon /var/lib/transmission-daemon/.config/transmission-daemon
+ s lnf -T /i/transmission-daemon /var/lib/transmission-daemon/.config/transmission-daemon
#
# config file documented here, and it's the same config
# for daemon vs client, so it's documented in the gui.
# match source or dest port. when we send to 25, it picks a random high port as
# the source.
-for port in 25 993; do # smtp and imap with ssl.
-e iptables -t mangle $iptables_op OUTPUT -m tcp -p tcp -m multiport --ports $port -j MARK --set-mark 0x1
+for port in 25 143; do # smtp and imap.
+ e iptables -t mangle $iptables_op \
+ OUTPUT -m tcp -p tcp -m multiport --ports $port -j MARK --set-mark 0x1
done
e iptables -t nat $iptables_op POSTROUTING -o tun0 -m mark --mark 0x1 -j SNAT --to-source 10.8.0.4
e ip rule $ip_op fwmark 1 table 1
-#!/bin/bash -l
+#!/bin/bash
# Copyright (C) 2016 Ian Kelling
# Licensed under the Apache License, Version 2.0 (the "License");
After=multi-user.target
[Service]
+User=ian
Type=oneshot
ExecStart=/a/bin/log-quiet/sysd-mail-once offlineimap-sync /a/bin/distro-setup/offlineimap-sync
EOF
# 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.
-lnf -T /q/radicale /var/lib/radicale
+lnf -T /o/radicale /var/lib/radicale
acme-tiny -n cal.iank.pw
done
}
-ports=(25 993)
+ports=(25 143)
case $1 in
start)
do-forward -A ${ports[@]}