Pin: release n=focal,o=Ubuntu
Pin-Priority: 500
EOF
+ sd /etc/apt/preferences.d/psd <<'EOF'
+Package: profile-sync-daemon
+Pin: release n=focal,o=Ubuntu
+Pin-Priority: 500
+EOF
+ seru enable psd
+ seru sart psd
+
f=/etc/apt/sources.list.d/focal.list
t=$(mktemp)
cat >$t <<'EOF'
# See logind.conf(5) for details.
[Login]
HandleLidSwitch=ignore
+# seems like a good idea.
+# https://wiki.archlinux.org/index.php/profile-sync-daemon#I_need_more_memory_to_accommodate_my_profile/profiles_in_/run/user/xxxx._How_can_I_allocate_more?
+RuntimeDirectorySize=50%
# 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, primary-setup doesnt get called on distro-begin
+# todo: sm pull really needs to execute as systemd else it will always fail
+# because of journal reload
+#
+# todo: bbk -t kw didn't remount /p to a new subvol
# todo setup better backup/sync of MAIL_HOST emails
fi
m cd $ncdir/config
if [[ ! -e config.php-orig ]]; then
- m cp config.php config.php-orig
+ m cp -a config.php config.php-orig
fi
cat config.php-orig - >tmp.php <<EOF
# https://docs.nextcloud.com/server/19/admin_manual/configuration_server/email_configuration.html
m sudo -u www-data php $ncdir/occ app:install $app
fi
done
- # https://docs.nextcloud.com/server/19/admin_manual/configuration_server/background_jobs_configuration.html
i /etc/cron.d/$ncbase <<'EOF'
-*/5 * * * * php -f $ncdir/cron.php --define apc.enable_cli=1
+SHELL=/bin/bash
+# automatic update. https://stackoverflow.com/questions/26915448/how-do-i-copy-stderr-without-stopping-it-writing-to-the-terminal
+0 9 * * * www-data php { $ncdir/updater/updater.phar -n 2> >(tee >(cat 1>&2)) || echo fail >&2; } | systemd-cat -t ncupdate
+# https://docs.nextcloud.com/server/19/admin_manual/configuration_server/background_jobs_configuration.html
+*/5 * * * * php -f $ncdir/cron.php --define apc.enable_cli=1 |& log-once nccron
EOF
done
my_pids+=($p)
done
-
for vol in q a o i; do
d=/$vol
if ! awk '{print $2}' /etc/fstab | grep -xF $d &>/dev/null; then
# eg. when r=/q/p, for lines like
# /q/p /p none bind 0 0
# output /p
- new_roots+=($(sed -rn "s#^$r/\S+\s+(\S+)\s+none\s+bind\s.*#\1#p" /etc/fstab))
+ new_roots+=($(sed -rn "s#^$r/\S+\s+(\S+)\s+none\s+(\S+,|)bind[[:space:],].*#\1#p" /etc/fstab))
done
(( ${#new_roots} )) || break
binds+=(${new_roots[@]})
grep -vxF "Found a valid Btrfs stream header, version 1" | \
grep -cv "^[^;]*;snapshot: ") ||:
if [[ $lines == 0 ]]; then
- x btrfs sub del $leaf
+ # the snapshot diff is broken, it deleted a snapshot that was different.
+ # I need some examples to test on.
+ # also, why are we ignoring the error code in the snapshot diff,
+ # seems like we shouldnt do that
+ echo suspected identical: $bsub $leaf
+ #x btrfs sub del $leaf
fi
fi
fi
pidgin
pidgin-otr
pixz
+ profile-sync-daemon
pry
pv
python-autopep8
fi
fi
-if dpkg -s radicale &>/dev/null; then
- if [[ $HOSTNAME == "$MAIL_HOST" ]]; then
- m sudo systemctl restart radicale
- m sudo systemctl enable radicale
- if [[ -e /etc/logrotate.d/radicale.disabled ]]; then
- m sudo mv /etc/logrotate.d/radicale{.disabled,}
- fi
- else
- m sudo systemctl stop radicale
- m sudo systemctl disable radicale
- # weekly logrotate tries to restart radicale even if it's a disabled service in flidas.
- if [[ -e /etc/logrotate.d/radicale ]]; then
- m sudo mv /etc/logrotate.d/radicale{,.disabled}
- fi
- fi
-fi
+# if dpkg -s radicale &>/dev/null; then
+# if [[ $HOSTNAME == "$MAIL_HOST" ]]; then
+# m sudo systemctl restart radicale
+# m sudo systemctl enable radicale
+# if [[ -e /etc/logrotate.d/radicale.disabled ]]; then
+# m sudo mv /etc/logrotate.d/radicale{.disabled,}
+# fi
+# else
+# m sudo systemctl stop radicale
+# m sudo systemctl disable radicale
+# # weekly logrotate tries to restart radicale even if it's a disabled service in flidas.
+# if [[ -e /etc/logrotate.d/radicale ]]; then
+# m sudo mv /etc/logrotate.d/radicale{,.disabled}
+# fi
+# fi
+# fi
if [[ $HOSTNAME == "$MAIL_HOST" ]]; then
m sudo systemctl start openvpn-client@hole
m /a/exe/mail-setup
exit 0
-:
--- /dev/null
+#
+# $XDG_HOME_CONFIG/psd/psd.conf
+#
+# For documentation, refer to the psd man page or the wiki page
+# https://wiki.archlinux.org/index.php/Profile-sync-daemon
+
+## NOTE the following:
+## To protect data from corruption, in the event that you do make an edit while
+## psd is active, any changes made will be applied the next time you start psd.
+
+# Uncomment and set to "yes" to use overlayfs instead of a full copy to reduce
+# the memory costs and to improve sync/unsync operations. Note that your kernel
+# MUST have this module available in order to use this mode
+#
+USE_OVERLAYFS="yes"
+
+# List browsers separated by spaces to include in the sync. Useful if you do not
+# wish to have all possible browser profiles sync'ed which is the default if
+# this variable is left commented.
+#
+# Possible values:
+# chromium
+# chromium-dev
+# conkeror.mozdev.org
+# epiphany
+# falkon
+# firefox
+# firefox-trunk
+# google-chrome
+# google-chrome-beta
+# google-chrome-unstable
+# heftig-aurora
+# icecat
+# inox
+# luakit
+# midori
+# opera
+# opera-beta
+# opera-developer
+# opera-legacy
+# otter-browser
+# qupzilla
+# qutebrowser
+# palemoon
+# rekonq
+# seamonkey
+# surf
+# vivaldi
+# vivaldi-snapshot
+#
+BROWSERS="firefox"
+
+# Uncomment and set to "no" to completely disable the crash recovery feature.
+#
+# The default is to create crash recovery backups if the system is ungracefully
+# powered-down due to a kernel panic, hitting the reset switch, battery going
+# dead, etc. Some users keep very diligent backups and don't care to have this
+# feature enabled.
+USE_BACKUPS="no"
+
+# Uncomment and set to an integer that is the maximum number of crash recovery
+# snapshots to keep (the oldest ones are delete first).
+#
+# The default is to save the most recent 5 crash recovery snapshots.
+#BACKUP_LIMIT=5